Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Avoid quoting the string in the psycopg version macro | Daniele Varrazzo | 2018-02-19 | 1 | -2/+6 |
| | | | | | | | Use a macro trick to add the quotes. This seems more portable than passing the quotes to the command line (see #658). https://gcc.gnu.org/onlinedocs/cpp/Stringizing.html | ||||
* | Added async_ as an alias for async | Daniele Varrazzo | 2017-02-03 | 1 | -4/+6 |
| | | | | | Added in argument for psycopg2.connect() and connection.__init__, and for the connection.async attribute. | ||||
* | Use -1 instead of 0 to say "calculate the length" in many funcs | Daniele Varrazzo | 2016-12-27 | 1 | -6/+2 |
| | | | | 0 is a valid length, isn't it? | ||||
* | Merge branch 'master' into named-callproc | Daniele Varrazzo | 2016-12-26 | 1 | -1/+1 |
|\ | |||||
* \ | Merge branch 'master' into named-callproc | Daniele Varrazzo | 2016-12-26 | 1 | -23/+29 |
|\ \ | |/ | |||||
| * | Dropped ifdef guards against obsolete libpq versions | Daniele Varrazzo | 2016-08-15 | 1 | -7/+0 |
| | | | | | | | | | | One of them was actually wrong: lobject_type.c wouldn't have compiled pre 8.3 (broken in 6e841a41, 2 years ago). | ||||
| * | Merge branch 'master' into replication-protocol | Daniele Varrazzo | 2016-08-07 | 1 | -19/+3 |
| |\ | | | | | | | | | | | | | Conflicts: tests/testconfig.py | ||||
| | * | Merge branch 'conn-get-parameters' | Daniele Varrazzo | 2016-07-01 | 1 | -19/+3 |
| | |\ | |||||
| | | * | Add connection.get_dsn_parameters() | Oleksandr Shulgin | 2015-10-30 | 1 | -19/+3 |
| | | | | |||||
| * | | | Remove some dead code | Oleksandr Shulgin | 2016-03-08 | 1 | -1/+1 |
| | | | | |||||
| * | | | Use python-defined make_dsn() for ReplicationConnection class | Oleksandr Shulgin | 2016-03-08 | 1 | -202/+7 |
| | | | | |||||
| * | | | Merge branch 'master' into feature/replication-protocol-c-connection-object | Oleksandr Shulgin | 2016-03-04 | 1 | -2/+3 |
| |\ \ \ | | |/ / | |||||
| | * | | Validate output result from make_dsn() | Daniele Varrazzo | 2016-03-03 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | The output is not necessarily munged anyway: if no keyword is passed, validate the input but return it untouched. | ||||
| | * | | Added parse_dsn() docstring | Daniele Varrazzo | 2016-03-03 | 1 | -1/+2 |
| | |/ | |||||
| * | | Move replication connection to C level. | Oleksandr Shulgin | 2015-10-27 | 1 | -1/+11 |
| | | | |||||
| * | | Merge branch 'feature/connect2' into feature/replication-protocol | Oleksandr Shulgin | 2015-10-27 | 1 | -7/+203 |
| |\ \ | |||||
| | * | | Rework psycopg2.connect() interface. | Oleksandr Shulgin | 2015-10-27 | 1 | -7/+203 |
| | |/ | |||||
| * | | Properly subclass ReplicationCursor on C level. | Oleksandr Shulgin | 2015-10-19 | 1 | -2/+7 |
| | | | |||||
| * | | Merge branch 'master' into feature/replication-protocol | Oleksandr Shulgin | 2015-10-15 | 1 | -1/+62 |
| |\ \ | | |/ | |||||
| * | | Add psyco_curs_datetime_init | Oleksandr Shulgin | 2015-10-14 | 1 | -0/+1 |
| | | | |||||
| * | | Merge remote-tracking branch 'origin/master' into repl | Oleksandr Shulgin | 2015-10-01 | 1 | -0/+55 |
| |\ \ | |||||
| * \ \ | Merge branch 'master' into feature/replication-message-object | Oleksandr Shulgin | 2015-06-30 | 1 | -1/+17 |
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/extensions.py | ||||
| * | | | | Expose ReplicationMessage type in extras | Oleksandr Shulgin | 2015-06-11 | 1 | -0/+1 |
| | | | | | |||||
| * | | | | Add handling of send_time field in replmsg | Oleksandr Shulgin | 2015-06-10 | 1 | -0/+1 |
| | | | | | |||||
| * | | | | Add ReplicationMessage object | Oleksandr Shulgin | 2015-06-05 | 1 | -0/+4 |
| | | | | | |||||
* | | | | | Return input tuple in cur.callproc, factor code to use PQescapeIdentifier in ↵ | mrmilosz | 2015-12-13 | 1 | -8/+1 |
| |_|_|/ |/| | | | | | | | | | | | single place | ||||
* | | | | Proper unicode handling in quote_ident. | Oleksandr Shulgin | 2015-10-15 | 1 | -9/+29 |
| | | | | |||||
* | | | | Add psycopg2.extensions.quote_ident. | Oleksandr Shulgin | 2015-10-14 | 1 | -0/+38 |
| | | | | |||||
* | | | | Decref the ssl module after importing | Daniele Varrazzo | 2015-10-01 | 1 | -1/+4 |
| |_|/ |/| | | |||||
* | | | Added unicode support to parse_dsn | Daniele Varrazzo | 2015-10-01 | 1 | -24/+27 |
| | | | | | | | | | | | | Also added support for the argument as a keyword. | ||||
* | | | Merge branch 'master' into feature/parse-dsn | Oleksandr Shulgin | 2015-06-02 | 1 | -1/+17 |
|\ \ \ | | |/ | |/| | | | | | | | Conflicts: lib/extensions.py | ||||
| * | | Dropped PG_VERSION_HEX constant | Daniele Varrazzo | 2015-06-02 | 1 | -2/+2 |
| | | | | | | | | | | | | At PostgreSQL 10.0 it would have become awkward. | ||||
| * | | Add libpq version discovery | Oleksandr Shulgin | 2015-06-01 | 1 | -0/+16 |
| |/ | |||||
* | | Move parse_dsn to extensions, add tests | Oleksandr Shulgin | 2015-06-01 | 1 | -13/+25 |
| | | |||||
* | | Add parse_dsn module function | Oleksandr Shulgin | 2015-06-01 | 1 | -0/+40 |
|/ | | | | | | | | Calls PQconninfoParse to parse the dsn into a list of keyword and value structs, then constructs a dictionary from that. Can be useful when one needs to alter some part of the the connection string reliably, but doesn't want to get into all the details of parsing a dsn string: quoting, URL format, etc. | ||||
* | Make sure libcrypto threadsafety callbacks are properly set up | Jan Urbański | 2015-05-03 | 1 | -0/+23 |
| | | | | | | | | | | | | | | | | Multithreaded programs using libcrypto (part of OpenSSL) need to set up callbacks to ensure safe execution. Both Python and libpq set up those callbacks, which might lead to a conflict. To avoid leaving dangling function pointers when being unloaded, libpq sets up and removes the callbacks every time a SSL connection it opened and closed. If another Python thread is performing unrelated SSL operations (like connecting to a HTTPS server), this might lead to deadlocks, as described in http://www.postgresql.org/message-id/871tlzrlkq.fsf@wulczer.org Even if the problem will be remediated in libpq, it's still useful to have it fixed in psycopg2. The solution is to use Python's own libcrypto callbacks and completely disable handling them in libpq. | ||||
* | Make Column picklable on Python >= 3.3 | Daniele Varrazzo | 2015-02-08 | 1 | -3/+19 |
| | | | | | Also expose the type from the extensions module, not from the main module. | ||||
* | Allow pickling of cursor.description | Owen Raccuglia | 2015-02-08 | 1 | -0/+1 |
| | | | | | | | | | This is for people using dtuple.py; a dtuple.DatabaseTuple instance keeps a reference to cursor.description, which is not picklable because psycopg2 doesn't export the Column namedtuple it uses. This commit exports the Column namedtuple, and includes a test to verify the pickle/unpickle works after exporting Column. | ||||
* | Don't import psycopg2.tz into the C extension | Daniele Varrazzo | 2014-08-28 | 1 | -17/+0 |
| | | | | | | | | | | | | | | | | | | | This makes possible to import _psycopg directly, after adding the package directory to the pythonpath. This enables hacks such as: sys.path.insert(0, '/path/to/psycopg2') import _psycopg sys.modules['psycopg2._psycopg'] = _psycopg sys.path.pop(0) which can work around e.g. the problem of #201, freeze that cannot freeze psycopg2. Well, freeze cannot freeze it because it's just not designed to deal with C extensions. At least now the frozen application can hack the pythonpath and work around the limitation by importing _psycopg as above and then doing the rest of the imports normally. Keeping long-lived references to python objects is bad anyway: the tz module couldn't be reloaded before. | ||||
* | Dropped PSYCOPG_EXTENSIONS flag | Daniele Varrazzo | 2014-08-23 | 1 | -10/+0 |
| | | | | | | Building without extensions has been long broken and nobody really cares about a pure-DBAPI implementation (which could be created using a wrapper instead). | ||||
* | Dropped simple type wrapper functions | Daniele Varrazzo | 2014-08-15 | 1 | -16/+8 |
| | | | | | These functions don't need to exist: exposing the type in the module is enough. It is actually better as one may use isinstance and such. | ||||
* | Fix multiple misspellings | Piotr Kasprzyk | 2013-04-26 | 1 | -1/+1 |
| | |||||
* | Fixed build on windows | Daniele Varrazzo | 2013-04-06 | 1 | -3/+7 |
| | | | | Will fail with error: initializer element is not constant | ||||
* | Use the Py_RETURN_NONE macro | Daniele Varrazzo | 2013-04-05 | 1 | -2/+1 |
| | |||||
* | PyType_GenericAlloc is the default allocator: no need to specify | Daniele Varrazzo | 2013-03-20 | 1 | -45/+34 |
| | |||||
* | Notify and Xid objects and types renamed for consistency | Daniele Varrazzo | 2013-03-20 | 1 | -8/+8 |
| | | | | They were the only objects starting with uppercase. My fault. | ||||
* | psycopg2.Error object and type renamed more consistently | Daniele Varrazzo | 2013-03-20 | 1 | -7/+7 |
| | |||||
* | Store a PGresult in the Exception error | Daniele Varrazzo | 2013-03-19 | 1 | -17/+9 |
| | | | | | This makes the Diagnostics independent from further operations on the cursor and allows using it with exceptions not generated by a cursor. | ||||
* | Added a C structure to psycopg.Error | Daniele Varrazzo | 2013-03-19 | 1 | -114/+17 |
| | | | | This will allow to store a PGresult in it. | ||||
* | Work-in-progress support for retrieving PG_DIAG result error fields. | Matthew Woodcraft | 2013-03-17 | 1 | -0/+13 |
| |