Commit Graph

2114 Commits

Author SHA1 Message Date
Daniele Varrazzo
4003b7c977 Fixed callproc return value refcount
Temporary anyway: I want to go back returning a list (or dict).
2015-12-12 17:51:45 -05:00
Daniele Varrazzo
021f6d22ad More straightforward param refcount handling in callproc 2015-12-12 17:51:45 -05:00
Daniele Varrazzo
7302f348bc Added test with objects without length as callproc param 2015-12-12 17:51:08 -05:00
Daniele Varrazzo
d297976d6d Raise TypeError if the dict in callproc param contains non-strings
Check-and-conversion chain fixed and simplified. 'spname' was a
reference leak.
2015-12-12 17:51:08 -05:00
Daniele Varrazzo
a3eed9c9f5 Added guard on params with no length on callproc 2015-12-12 17:51:08 -05:00
Daniele Varrazzo
04ce14b251 Avoid clobbering the exceptions raised by other calls 2015-12-12 17:49:59 -05:00
mrmilosz
c205f140a0 callproc: tests, docs, and comment/error-reporting touchups. 2015-12-12 17:49:59 -05:00
mrmilosz
37a80e9de8 callproc: checking for libpq 9.0+ on compile. yes: use PQescapeIdentifier. no: error 2015-12-12 17:49:44 -05:00
mrmilosz
3948e909e4 callproc: now more compliant with local coding standards. 2015-12-12 17:49:44 -05:00
mrmilosz
e9bb4a86f9 cursor.callproc: added a missing memory check 2015-12-12 17:49:25 -05:00
mrmilosz
31c95c0922 callproc using a dict now uses connection encoding and sanitizes parameter names 2015-12-12 17:49:25 -05:00
mrmilosz
1205bf9c2b callproc using a dict now has a type check to make sure the keys are strings. 2015-12-12 17:49:25 -05:00
mrmilosz
23d279945f cursor.callproc now also accepts dict for PostgreSQL 9+ "named notation" 2015-12-12 17:49:25 -05:00
Jan Janßen
b3def74002 Update psycopg1.py 2015-11-10 17:02:59 +01:00
Udi Oron
cf83470891 Suggest installing psycopg2 in windows using pip
pip is becoming the standard method for installing python packages, and now binary wheels are a better and easier option for users:
https://github.com/psycopg/psycopg2/issues/368
2015-11-10 00:35:02 +02:00
Oleksandr Shulgin
051e6d1364 Add skip_before_libpq for test_get_dsn_parameters 2015-10-30 13:02:45 +01:00
Oleksandr Shulgin
e61db578cf Add dbname=replication for physical replication type. 2015-10-30 13:00:55 +01:00
Oleksandr Shulgin
602fefcae3 Fix typo in a new test name 2015-10-30 11:38:28 +01:00
Oleksandr Shulgin
a4cbb088fe Add connection.get_dsn_parameters() 2015-10-30 11:10:41 +01:00
Oleksandr Shulgin
fbcf99ad07 Move replication connection to C level. 2015-10-27 18:21:24 +01:00
Oleksandr Shulgin
433fb957cb Merge branch 'feature/connect2' into feature/replication-protocol 2015-10-27 17:37:18 +01:00
Oleksandr Shulgin
7aba8b3ed0 Rework psycopg2.connect() interface. 2015-10-27 17:35:57 +01:00
Oleksandr Shulgin
4b9a6f48f3 Merge branch 'master' into feature/replication-protocol 2015-10-27 12:16:41 +01:00
Oleksandr Shulgin
fe4cb0d493 Fix stale Dprintfs in pqpath.c referring to 'status' 2015-10-26 17:40:39 +01:00
Oleksandr Shulgin
8b79bf43ac Drop ReplicationCursor.flush_feedback(), rectify pq_*_replication_*() interface. 2015-10-23 18:30:18 +02:00
Oleksandr Shulgin
dd6bcbd04f Improve async replication example. 2015-10-23 17:51:03 +02:00
Oleksandr Shulgin
e69dafbecc Move the decode parameter to start_replication().
It makes more sense this way, because otherwise it must be passed to every call
of `read_message()`.
2015-10-23 11:31:55 +02:00
Oleksandr Shulgin
76c7f4a0b5 Use direct call to consume() callable in pq_copy_both() 2015-10-22 16:17:08 +02:00
Oleksandr Shulgin
22cbfb26d6 Actually add replication tests to the test suite. 2015-10-20 13:05:43 +02:00
Oleksandr Shulgin
089e745af6 Fix cursor_init() declaration for use in replication_cursor_type.c 2015-10-20 12:55:43 +02:00
Oleksandr Shulgin
b3f8e9adb5 Fix send_time printf format in replmsg_repr(). 2015-10-20 12:54:22 +02:00
Oleksandr Shulgin
23abe4f501 Add quick start to the replication doc, minor doc fixes. 2015-10-20 12:36:13 +02:00
Oleksandr Shulgin
0bb81fc848 Properly subclass ReplicationCursor on C level. 2015-10-19 20:00:39 +02:00
Oleksandr Shulgin
7aea2cef6e Improve async replication test. 2015-10-19 17:02:18 +02:00
Oleksandr Shulgin
4ab7cf0157 Replace stop_replication with requirement for an exception. 2015-10-19 15:42:42 +02:00
Oleksandr Shulgin
0435320f34 Fix PSYCOPG2_TEST_REPL_DSN handling. 2015-10-16 16:36:03 +02:00
Oleksandr Shulgin
cf4f2411bf Fix async replication and test. 2015-10-15 18:01:43 +02:00
Oleksandr Shulgin
d14fea31a3 Use quote_ident from psycopg2.extensions 2015-10-15 12:56:21 +02:00
Oleksandr Shulgin
8e518d4954 Merge branch 'master' into feature/replication-protocol 2015-10-15 12:27:43 +02:00
Daniele Varrazzo
6763578cc0 Merge branch 'extensions-quote-ident' 2015-10-15 11:08:34 +01:00
Daniele Varrazzo
109409bc95 Mention quote_ident() in NEWS file 2015-10-15 11:06:44 +01:00
Oleksandr Shulgin
89bb6b0711 Proper unicode handling in quote_ident. 2015-10-15 11:52:18 +02:00
Oleksandr Shulgin
9ab38ee8c5 Add psyco_curs_datetime_init 2015-10-14 18:39:48 +02:00
Oleksandr Shulgin
28a1a00d1c Remove commented copy_both code in pqfetch. 2015-10-14 18:39:20 +02:00
Oleksandr Shulgin
e3097ec956 Fix select/timeout indication in async replication example 2015-10-14 17:42:53 +02:00
Oleksandr Shulgin
822d671e8b Clear repl_stop flag after the consume loop. 2015-10-14 17:40:39 +02:00
Oleksandr Shulgin
e05b4fd267 Add checks on replication state, have to have a separate check for consume loop. 2015-10-14 17:36:50 +02:00
Oleksandr Shulgin
9295bce154 Add psycopg2.extensions.quote_ident. 2015-10-14 17:00:25 +02:00
Oleksandr Shulgin
a0b42a12ff Update stop_repl, require replication consumer to be a callable. 2015-10-14 15:15:07 +02:00
Oleksandr Shulgin
fea2260fc5 Fix stop_replication: always raise outside the loop. 2015-10-14 12:50:08 +02:00