summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Added support for arrays of composite typesDaniele Varrazzo2011-09-221-0/+23
|
* Added support for arrays of hstoresDaniele Varrazzo2011-09-221-1/+58
|
* Fixed typecasting of arrays containing consecutive backslashesDaniele Varrazzo2011-09-221-0/+11
|
* Added new_array_type() functionDaniele Varrazzo2011-09-221-0/+13
| | | | Allows the creation of a generic array typecaster from Python.
* Allocate dynamically memory for the list of columns in COPYDaniele Varrazzo2011-09-121-0/+19
| | | | Some bloke finds the limit of 8K too restrictive... ticket #68.
* Fixed interaction between RealDictCursor and named cursorsDaniele Varrazzo2011-09-121-0/+15
| | | | Closes ticket #67.
* WITH HOLD documentation a argument parsing changesFederico Di Gregorio2011-08-101-2/+0
| | | | Now any true value will do for the withhold parameter.
* Merge remote-tracking branch 'piro/devel' into develFederico Di Gregorio2011-08-101-0/+11
|\
| * Fixed NamedTupleCursor.executemany() (ticket #65)Daniele Varrazzo2011-08-091-0/+11
| |
* | New 'withhold' parameter for connection.cursor()Federico Di Gregorio2011-08-101-1/+13
|/
* First try at curs.withhold implementationFederico Di Gregorio2011-07-051-0/+21
|
* Method set_transaction() renamed to set_session()Daniele Varrazzo2011-06-081-24/+24
| | | | | | In fact it doesn't change "the transaction", as there has to be no transaction when invoked. The effect instead is to execute SET SESSION CHARACTERISTICS.
* Fixed copyfile refcount in copy_expertDaniele Varrazzo2011-06-071-0/+9
| | | | | | | In case of early error, jumping to exit would have decref'd the borrowed reference to file. Issue spotted by Dave Malcolm, thanks!
* Fixed test to run on Python <= 2.5Daniele Varrazzo2011-06-031-2/+2
| | | | tuple.index() is not available on these versions.
* Merge branch 'transaction-control' into develDaniele Varrazzo2011-06-031-3/+248
|\
| * Use only the isolation levels available on old PG versionsDaniele Varrazzo2011-06-031-2/+11
| |
| * Added autocommit property on connectionDaniele Varrazzo2011-06-021-0/+92
| |
| * Added partial implementation for set_transactionDaniele Varrazzo2011-06-011-1/+145
| | | | | | | | autocommit to be implemented yet.
* | Test tweaked to deal with missing usecs in BC timestampsDaniele Varrazzo2011-06-031-1/+5
| | | | | | | | | | Probably depending on compile time options. On my test db usecs are available from PG 8.4.
* | Merge branch 'neg-escape' into develDaniele Varrazzo2011-05-301-0/+10
|\ \ | |/ |/|
| * Fixed escape for negative numbers prefixed by minus operatorDaniele Varrazzo2011-05-301-0/+10
| | | | | | | | Closes ticket #57.
* | Use all the isolation levels accepted by PostgreSQLDaniele Varrazzo2011-05-111-13/+19
|/ | | | In PG 9.1 repeatable read and serializable are distinct levels.
* Skip a test on the proper PG functionDaniele Varrazzo2011-04-271-1/+1
|
* Don't fetch all the records iterating a NamedTuple cursor on a named cursorDaniele Varrazzo2011-04-261-1/+18
|
* Fixed interaction between NamedTuple and named cursorDaniele Varrazzo2011-04-261-0/+32
| | | | | Build the nametuple after fetching the first resutl, or else cursor.description will be empty.
* Normalize the encoding name at connectionDaniele Varrazzo2011-04-081-0/+14
| | | | | | | | | | | | The encoding can be set by PGCLIENTENCODING, which may be an alternative spelling. Bug reported by Peter Eisentraut. At this point the idea of considering one of the random spellings such as EUC_CN as somewhat "blessed" is debunked. So just store the cleaned-up version of the encoding in the mapping table. Note that the cleaned-up version was needed by the unicode adapter: this requirement has been surpassed as the connection now contains a copy of the Python codec name set whenever the client encoding is set.
* Don't check the test db exists at psycopg2.tests import timeDaniele Varrazzo2011-03-301-11/+11
|
* Fixed bytea encoding tests skipping when ctypes is not availableDaniele Varrazzo2011-03-261-3/+15
|
* Added tests for our own bytea parserDaniele Varrazzo2011-03-261-0/+86
| | | | | Because the parse function is not supposed to be exposed in Python, use ctypes to directly inspect the C function.
* Parse bytea output format ourselves instead of using the libpqDaniele Varrazzo2011-03-262-27/+1
| | | | | | PG 9.0 uses the hex format by default, and clients < 9.0 can't parse that format, requiring client update and great care in what is linked at runtime, and generally giving headache to users and transitively us.
* Correctly detect an empty query sent to the backendDaniele Varrazzo2011-03-041-0/+6
| | | | Closes ticket #46.
* Fixed use of the new return value of HstoreAdapter.get_oids()Daniele Varrazzo2011-02-251-1/+1
|
* Don't limit the hstore search to the public schema onlyDaniele Varrazzo2011-02-251-1/+1
| | | | | | Looks like there is a case for installing hstore somewhere else (see ticket #45). And after all the typecaster can be registered on a list of OIDs, so let's grab them all.
* Raise an exception if the libpq fails to decode bytea in hex formatDaniele Varrazzo2011-02-233-1/+47
|
* Fixed test for execution with older PostgreSQL versionsDaniele Varrazzo2011-02-231-1/+2
|
* The cursor name can be a non-valid PostgreSQL identifierDaniele Varrazzo2011-02-231-0/+10
|
* Added oid parameter to register_hstore()Daniele Varrazzo2011-02-211-0/+20
| | | | | | | The parameter is mostly useful with async connections that would need a different protocol to be queried. Issue reported by Jan "the Asynchronous".
* Tweaks to test timing to avoid errors on test VMsDaniele Varrazzo2011-02-201-3/+3
|
* Added regression test to check {} is also a valid stringDaniele Varrazzo2011-02-201-0/+3
|
* Add a type converter to handle untyped empty arrays.Benjamin Poulain2011-02-201-0/+10
| | | | | | | | Empty array can be returned untyped by postgres. To handle this case, a special handler is added for the type UNKNOWNOID. If the value return by the database is strictly equal to "{}", the value is converted. Otherwise, the conversion fallback on the default handler.
* Merge remote branch 'jason/devel' into develDaniele Varrazzo2011-02-191-2/+2
|\ | | | | | | | | Conflicts: psycopg/notify_type.c
| * Merge branch 'devel' of github.com:jerickso/psycopg into develJason Erickson2011-02-181-2/+2
| |\
| | * Again, increase timeout on concurrent_exec testsJason Erickson2011-02-181-2/+2
| | | | | | | | | | | | | | | Truly increase the sleep timeout to 4 seconds and the check to 7. Previous commit message indicated that, but reality was different.
* | | Added complete roundtrip test with copy_expert and UnicodeDaniele Varrazzo2011-02-191-1/+34
| | |
* | | Provide cursor.description as named tuple if possibleDaniele Varrazzo2011-02-193-21/+58
|/ / | | | | | | If namedtuple() is not available, use regular tuples.
* | Make Binary(None) work as expected, adapting to NULLDaniele Varrazzo2011-02-181-0/+5
| | | | | | | | Issue reported by Stefano Dal Pra.
* | Some cleanup in mogrifyDaniele Varrazzo2011-02-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Raise an exception on incomplete placeholders. - Minor speedups. - Don't change the string in place (??!!) if the placeholder is not s and the value is null. The latter point can be done because downstream we don't accept anything different from s anyway (in the Bytes_Format function). Notice that now the format string is constant whatever the arguments. This means that executemany is still more inefficient than it should be as mogrify may work only on the parameters. However this is an implementation only worthwhile if we start supporting real parameters. Let's talk about that for the next release.
* | Added cursor.itersizeDaniele Varrazzo2011-02-171-3/+3
| | | | | | | | | | | | | | The value is used to control the number of records to fetch per network roundtrip in named cursors iteration. Used to avoid the inefficient arraysize default of 1 without giving this value the magic meaning of 2000.
* | Merge remote branch 'jason/devel' into develDaniele Varrazzo2011-02-171-2/+2
|\ \ | |/
| * Increase timeout on concurrent_execution testJason Erickson2011-02-141-2/+2
| | | | | | | | | | | | | | | | With test_concurrent_execution test, checking two threads issuing a pg_sleep of 2 seconds and and check if they complete in under 3 seconds occasionally fails when the test is run in a virtual machine on a VM Server with other virtual machines running. Increased the sleep to 4, and the check to 7, giving 3 seconds buffer instead of 1 second.