summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* parse_hstore converted in class method.Daniele Varrazzo2010-11-051-3/+4
|
* Added function to parse an hstore into a dict.Daniele Varrazzo2010-11-051-0/+27
|
* Added implementation of python dict adapter to hstore.Daniele Varrazzo2010-11-051-0/+57
|
* Ensure unicode is accepted as type for transaction ids.Daniele Varrazzo2010-11-051-0/+28
| | | | | | We don't do somersaults to ensure people can use snowmen as transaction ids anyway: it would require passing the connection to xid_ensure and down below to use the correct encoding.
* Added Xid.from_string() constructor.Daniele Varrazzo2010-11-051-0/+30
| | | | It exposes the parsing rules used in restore.
* Dropped XID_UNPARSED: we use format_id = None for PG xact ids.Daniele Varrazzo2010-11-051-1/+1
|
* XA transaction ids can be decoded from PostgreSQL transaction ids.Daniele Varrazzo2010-11-051-0/+45
|
* Use pgjdbc algorithm to convert XA xids into strings.Daniele Varrazzo2010-11-051-0/+12
|
* Added tests for two-phase commit/rollback.Daniele Varrazzo2010-11-051-0/+164
|
* Added tpc_recover method.Daniele Varrazzo2010-11-051-0/+69
|
* hook up two phase commit tests.Daniele Varrazzo2010-11-052-6/+20
| | | | | | By James Henstridge on 2008-07-24. Merged from lp:~jamesh/psycopg/two-phase-commit/revision/359
* beginnings of a TPC test harnessDaniele Varrazzo2010-11-051-0/+138
| | | | | | By James Henstridge on 2008-05-12. Merged from lp:~jamesh/psycopg/two-phase-commit/revision/354
* Notify object exposed in the extensions module.Daniele Varrazzo2010-11-051-0/+23
|
* Adding Notify object with payload.Daniele Varrazzo2010-11-051-3/+36
|
* Check the correctness of the PID in the notify tests.Daniele Varrazzo2010-11-051-8/+15
|
* cursor.mogrify() accepts unicode queries.Daniele Varrazzo2010-10-051-0/+31
|
* The Inet type knows how to adapt itself.Daniele Varrazzo2010-09-251-0/+13
| | | | | Implemented __conform__ as the Adaptation PEP suggests. It is not required for the type to be registered as adapter.
* DBAPI compatibility test updated to 1.12.Daniele Varrazzo2010-09-231-12/+32
| | | | Nothing major: Python 3.0 compatibility fixes.
* Applied spelling fixes patch from Peter EisentrautFederico Di Gregorio2010-07-181-2/+2
|
* Exceptions raised by the columns iterator propagated.Daniele Varrazzo2010-07-101-0/+14
|
* Added test to verify copy_from() with columns.Daniele Varrazzo2010-07-101-1/+14
|
* Added test to verify executemany doesn't propagate exceptions.Daniele Varrazzo2010-07-092-0/+31
|
* Handle time zones with seconds in the UTC offset.Daniele Varrazzo2010-05-201-36/+20
| | | | The offset is rounded to the nearest minute.
* Tests can be run again different coroutine libraries.Daniele Varrazzo2010-05-191-2/+9
| | | | | Use PSYCOPG2_TEST_GREEN=<something>, where <something> is 1 or a library name. Currently eventlet is supported.
* Fixed time test to be independent from the TZ it runs.Daniele Varrazzo2010-05-151-2/+2
|
* Fixed TimeFromTicks for second values > 59.5.Daniele Varrazzo2010-05-151-2/+13
|
* Fixed TimestampFromTicks for second values > 59.5.Daniele Varrazzo2010-05-151-0/+11
| | | | Bug reported and fixed by Jozsef Szalay on 2010-05-06 at 14:11:59.999920.
* Cast datetime into timestamptz when the tzinfo field is set.Daniele Varrazzo2010-05-151-1/+12
|
* Explicit cast of the SQL representation of time-related objects.Daniele Varrazzo2010-05-151-0/+91
| | | | | | | | Allow the objects to be recognized as the proper type by Postgres in not strong contexts: problem reported by Peter Eisentraut. Added tests to check the types are respected in a complete Py -> PG -> Py roundtrip without context.
* Adapt buffer objects using an explicit cast on the string literal.Daniele Varrazzo2010-05-151-1/+16
| | | | | | | | | | | | Don't rely on Postgres casting the literal according to the context: this doesn't work e.g. passing the object as function argument where a function with the same name but taking a text exists. It doesn't work either when the object is in an ARRAY construct. Added test to check the type is respected in a complete Py -> PG -> Py roundtrip without context. Bug and solution reported by Peter Eisentraut.
* Dropped large object support when psycopg is in green mode.Daniele Varrazzo2010-05-091-2/+2
| | | | | Async mode and large object are not compatible, albeit I haven't found an authoritative source yet.
* More lenient test timeout for a slow (or busy) machine.Daniele Varrazzo2010-04-231-2/+2
|
* Making sync and async connection setup somewhat more consistent.Daniele Varrazzo2010-04-232-0/+20
|
* Read the server version only after connection established.Daniele Varrazzo2010-04-211-1/+5
|
* Forbid COPY-related methods in green mode.Daniele Varrazzo2010-04-211-1/+7
| | | | | | | | | With the current implementation, at best they would silently block. They actually hang everything. Implementation posponed after some refactoring of the polling system, because it will be probably possible to provide an implementation for 'poll()' during COPY which is good for both async and green modes.
* Try to restore the connection state after a wait callback error.Daniele Varrazzo2010-04-211-0/+16
|
* Correctly flush async queries in 'green' mode.Daniele Varrazzo2010-04-212-0/+62
|
* The test suite can be run against the green path.Daniele Varrazzo2010-04-211-0/+7
|
* Notifications are automatically read after each query.Daniele Varrazzo2010-04-212-0/+102
| | | | Added tests for basic notifications process.
* Dropped redundant call to conn_notice_process().Daniele Varrazzo2010-04-212-0/+16
| | | | | | | | | | | If the connection is sync, notices will be processed by pq_fetch() downstream. If the connection is async, here we have only sent the query: no result is ready yet, and neither notices have had a chance to arrive: they will be retrieved later by pq_is_busy(). Added tests to check the above statement don't break.
* Connection method 'executing()' renamed to 'isexecuting()'.Daniele Varrazzo2010-04-211-12/+12
|
* Connection method 'issync()' changed into the attribute 'async'.Daniele Varrazzo2010-04-211-3/+3
|
* Remove fileno() and poll() from cursorsJan Urbański2010-04-211-12/+30
| | | | | | | | Instead, the code should be using the fileno() and poll() methods of the cursor's connection. Handle the case when poll() is called on an already built connection as a request to poll the asynchronous query (if there is one) and get NOTIFY events. Update the tests to reflect that change, add a test for NOTIFY.
* Add one more test for errors involving two cursorsJan Urbański2010-04-201-0/+9
|
* Handle errors in asynchronous queries.Jan Urbański2010-04-201-0/+23
| | | | | | | | Do it by keeping the reference to the last PGresult in the cursor and calling pq_fetch() before ending the asynchronous execution. This takes care of handling the possible error state of the PGresult and also allows the removal of the needsfetch flag, since now after execution ends the results are already fetched and parsed.
* Merged tests from piro and jan async fixes branchesFederico Di Gregorio2010-04-141-3/+2
|
* Make the first poll() of an asynchronous connection return POLL_WRITE.Jan Urbański2010-04-141-36/+33
| | | | | | | | | | This hides from the user the libpq's implementation detail of requiring the first select() to wait for the connection socket to become writable and makes it possible to have a uniform select loop for both cursors and connections, in which you always start by polling the object and then acting according to the result from poll(). Idea and implementation by Daniele Varrazzo.
* Make polling a cursor that's not in an async query raise an exception.Jan Urbański2010-04-141-1/+28
| | | | | | | If there is an asynchronous query, polling a cursor that did not initiate it will raise an exception. Polling while there is no asynchronous query underway still works, because the user needs to have a way to get asynchronous NOTIFYs.
* Merge remote branch 'piro/fix22' into python2Federico Di Gregorio2010-04-141-0/+45
|\
| * Added a test to check poll() correctly calls PQflush.Daniele Varrazzo2010-04-111-0/+30
| | | | | | | | | | | | | | When a large query is sent to the backend (and probably in high concurrency situations), writing the query could block. In this case PQflush() should be called until it returns 0. The test checks this is done correctly.