Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Autocommit shouldn't change deferrable on servers not supporting it | Daniele Varrazzo | 2018-02-08 | 1 | -2/+2 |
| | | | | Regression on unsupported Postgres versions after fixing bug #580 | ||||
* | Fixed idempotence check changing connection characteristics | Daniele Varrazzo | 2018-01-11 | 1 | -9/+22 |
| | |||||
* | Revert default_transaction_* to default only if setsession-attributes | Daniele Varrazzo | 2017-02-16 | 1 | -9/+13 |
| | | | | | | When moving from autocommit True -> False reset only the server parameters that were actually specified by psycopg to honour the serssion characteristics. | ||||
* | Check for deferrable unsupported applied to attribute too | Daniele Varrazzo | 2017-02-16 | 1 | -1/+8 |
| | |||||
* | Added readonly and deferrable attributes | Daniele Varrazzo | 2017-02-16 | 1 | -13/+3 |
| | |||||
* | Set default_transaction_* GUC if session state is changed in autocomit | Daniele Varrazzo | 2017-02-04 | 1 | -3/+72 |
| | |||||
* | Reuse set_session to implement autocommit, set_isolation_level | Daniele Varrazzo | 2017-02-04 | 1 | -49/+17 |
| | |||||
* | Better separation between interface and state change code | Daniele Varrazzo | 2017-02-04 | 1 | -82/+12 |
| | | | | The state change function has a C callable signature. | ||||
* | Don't use default_transaction_* for session characteristics | Daniele Varrazzo | 2017-02-04 | 1 | -162/+118 |
| | | | | | | | | | Store the state in the connection object and set the params on BEGIN Some tests fail: a few can be fixed reading transaction_* instead of default_transaction_*; but the behaviour of tx characteristics with autocommit is effectively changed. It may be addressed by setting default_transaction_* if autocommit is set. | ||||
* | Use the proper API functions to look up codec functions | Daniele Varrazzo | 2016-12-29 | 1 | -10/+5 |
| | |||||
* | Don't look up for Python encoding | Daniele Varrazzo | 2016-12-29 | 1 | -89/+121 |
| | | | | | | Store the encode/decode functions for the right codec in the connection. The Python encoding name has been dropped of the connection to avoid the temptation to use it... | ||||
* | Store python encoding and decoding functions in the connection | Daniele Varrazzo | 2016-12-27 | 1 | -4/+66 |
| | | | | Unused for now: will be used instead of 'pyenc', which is to be dropped. | ||||
* | Setting connection encoding refactored | Daniele Varrazzo | 2016-12-26 | 1 | -51/+56 |
| | | | | | | Code paths to read encoding on connection and to store the new connection in the structure after changing it in the backend unified into a single function. | ||||
* | conn->codec rename to pyenc | Daniele Varrazzo | 2016-12-26 | 1 | -45/+45 |
| | |||||
* | Merge branch 'master' into fast-codecs | Daniele Varrazzo | 2016-12-26 | 1 | -8/+36 |
|\ | |||||
| * | Avoid deadlock on close if set datestyle failed | Daniele Varrazzo | 2016-12-25 | 1 | -5/+11 |
| | | |||||
| * | Dropped testing print | Daniele Varrazzo | 2016-12-25 | 1 | -1/+0 |
| | | |||||
| * | do not "SET datestyle" on replication connections | Christoph Moench-Tegeder | 2016-10-21 | 1 | -3/+26 |
| | | | | | | | | | | | | A replication connection - marked by the use of the keyword "replication" in the DSN - does not support SET commands. Trying to sent "SET datestyle" will result in an exception. | ||||
* | | Optimize UTF8 and Latin1 decoding | Daniele Varrazzo | 2016-10-12 | 1 | -0/+29 |
|/ | | | | | Cache a pointer to a fast decoding function when the connection encoding is set so skip a repeated codec lookup for every string. | ||||
* | Allow connection.notices and notifies to be replaced. | Daniele Varrazzo | 2015-06-02 | 1 | -18/+51 |
| | | | | Close #326 | ||||
* | Pending notice list converted into a forward list | Daniele Varrazzo | 2015-06-02 | 1 | -7/+11 |
| | | | | This allows inserting the elements in order without using list.insert(). | ||||
* | Dropped unneeded constness on the notice message | Daniele Varrazzo | 2015-06-02 | 1 | -1/+1 |
| | | | | That's a strdup result, we 0wn it. | ||||
* | Fixed dsn and closed attributes in failing connection subclasses. | Daniele Varrazzo | 2014-04-03 | 1 | -3/+12 |
| | | | | From ticket #192 discussion. | ||||
* | Set the connection async before polling for connection | Daniele Varrazzo | 2014-02-24 | 1 | -5/+5 |
| | | | | It should fix ticket #194 | ||||
* | Set the connection async earlier in green mode | Daniele Varrazzo | 2014-02-24 | 1 | -4/+3 |
| | | | | | | The moment it is called shouldn't have really changed, but it's more explicit when it happens. Previously it was sort of obfuscated behind a roundtrip through the green callback and poll. | ||||
* | Meaningful connection errors report a meaningful message | Daniele Varrazzo | 2013-10-16 | 1 | -1/+6 |
| | | | | Fixes issue #173. | ||||
* | Fix multiple misspellings | Piotr Kasprzyk | 2013-04-26 | 1 | -2/+2 |
| | |||||
* | Fixed leak of cancel key on connection.reset() | Daniele Varrazzo | 2013-03-20 | 1 | -14/+18 |
| | | | | | Moving the final free into the destructor is not necessary but looks appropriate. | ||||
* | Dropped IFCLEARPGRES macro | Daniele Varrazzo | 2013-03-20 | 1 | -1/+1 |
| | | | | PQclear already guards against NULL, so the extra check is redundant | ||||
* | Notify and Xid objects and types renamed for consistency | Daniele Varrazzo | 2013-03-20 | 1 | -3/+3 |
| | | | | They were the only objects starting with uppercase. My fault. | ||||
* | Properly cleanup memory of broken connections | Daniele Varrazzo | 2013-03-16 | 1 | -2/+5 |
| | | | | Fixed ticket #148. | ||||
* | Discard any result produced by cursor.executemany() | Daniele Varrazzo | 2012-10-11 | 1 | -1/+1 |
| | |||||
* | Added function conn_close_locked() | Daniele Varrazzo | 2012-10-06 | 1 | -7/+17 |
| | |||||
* | Merge branch 'gcc-python-plugin' into devel | Daniele Varrazzo | 2012-03-05 | 1 | -35/+47 |
|\ | |||||
| * | More functions annotated for static analysis | Daniele Varrazzo | 2012-03-01 | 1 | -7/+7 |
| | | | | | | | | | | Also more return values checked for values < 0 for errors, instead of checking == 0 and leaving the positive side unchecked | ||||
| * | Use more compact macros to annotate functions for the static checker | Daniele Varrazzo | 2012-03-01 | 1 | -18/+9 |
| | | |||||
| * | Functions setting exception return a negative value on error | Daniele Varrazzo | 2012-03-01 | 1 | -18/+24 |
| | | | | | | | | | | This works around another shortcoming of the static checker; also to be discussed with the author. | ||||
| * | Use the newly provided attributes to validate exceptions raising | Daniele Varrazzo | 2012-03-01 | 1 | -1/+8 |
| | | | | | | | | | | Be more consistent in using 0 for success, <0 for failure, and to check for values < 0 instead of specific -1. | ||||
| * | Fixed possible NULL dereferencing in notice process | Daniele Varrazzo | 2012-02-24 | 1 | -2/+10 |
| | | |||||
* | | close() methods don't raise errors if called on closed objects | Daniele Varrazzo | 2012-03-04 | 1 | -4/+7 |
|/ | |||||
* | Put back a distinct ISOLATION_LEVEL_READ_UNCOMMITTED value | Daniele Varrazzo | 2011-12-15 | 1 | -10/+13 |
| | |||||
* | Reverted isolation level values to backward compatible values | Federico Di Gregorio | 2011-12-15 | 1 | -7/+6 |
| | | | | | | | | This basically removes the READ UNCOMMITED level (that internally PostgreSQL maps to READ COMMITED anyway) to keep the numeric values compattible with old psycopg versions. For full details and discussion see this thread: http://archives.postgresql.org/psycopg/2011-12/msg00008.php | ||||
* | Method set_transaction() renamed to set_session() | Daniele Varrazzo | 2011-06-08 | 1 | -5/+5 |
| | | | | | | 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. | ||||
* | Merge branch 'guc-cleanup' into devel | Daniele Varrazzo | 2011-06-05 | 1 | -74/+94 |
|\ | |||||
| * | Use the pqpath functions to get/set GUC parameters | Daniele Varrazzo | 2011-06-05 | 1 | -74/+94 |
| | | | | | | | | | | | | | | | | | | Functions conn_setup(), conn_get_isolation_level(), conn_set_transaction(), conn_switch_isolation_level(), conn_set_client_encoding() reimplemented using the pqpath funtitons. Dropped analogous function in the connection, as it had to take the lock, thus it was hard to build consistent pieces of functionality with it. | ||||
* | | Avoid a deadlock using concurrent green threads on the same connection | Daniele Varrazzo | 2011-06-05 | 1 | -1/+1 |
|/ | | | | | Use the async_cursor property to store an indication that something is running (even if it is not necessarily a cursor running the query). | ||||
* | Cleanup of notice processing | Daniele Varrazzo | 2011-06-04 | 1 | -14/+5 |
| | | | | | | | | | The function is always called in the context of functions grabbing the connection lock, so just use the same critical section instead of releasing and re-acquiring it. It is not a problem as serious as the notifies process (ticket #55) as the notices are a psycopg structure, not libpq. However the change allows again processing notices/notifies in the same place, which makes sense conceptually, plus we save some lock dance. | ||||
* | Process notifies when data is received, not when the result is parsed | Daniele Varrazzo | 2011-06-04 | 1 | -2/+0 |
| | | | | | | | Notifies process access the connection, is not limited to the result, so There is the possibility of loss of protocol sync in multithread programs. Closes ticket #55. | ||||
* | Use only the isolation levels available on old PG versions | Daniele Varrazzo | 2011-06-03 | 1 | -0/+7 |
| | |||||
* | Dropped isolation level from the connection object | Daniele Varrazzo | 2011-06-03 | 1 | -50/+113 |
| | | | | | | | | | | Don't issue a SET TRANSACTION ISOLATION LEVEL at every begin: use PG's GUC default, eventually set by set_transaction. Dropped the last query at connection, yay! Method set_isolation_level() and property isolation_level refactored using the new structures, keeping the previous semantic. |