Commit Graph

1651 Commits

Author SHA1 Message Date
Daniele Varrazzo
e225aad042 Habemus jsonb 2014-08-13 02:02:06 +01:00
Daniele Varrazzo
f40ad93a37 Added jsonb docs 2014-08-13 02:02:04 +01:00
Daniele Varrazzo
9d547469b8 Add register_default_jsonb() and register the type 2014-08-13 02:02:01 +01:00
Daniele Varrazzo
6bca443e37 Added name param to register_json() 2014-08-13 02:01:55 +01:00
Daniele Varrazzo
634fc004fb Added wishful test suite for jsonb type 2014-08-13 02:01:51 +01:00
Daniele Varrazzo
44281d6692 Fix supported Py/PG versions in docs 2014-08-04 22:39:52 +01:00
Daniele Varrazzo
6d6fd9acf7 Parse errocodes for PG 9.3 too
There is no new errcode defined so no need to release this as a change,
only change the docs.
2014-07-31 13:35:04 +01:00
Daniele Varrazzo
40dca9924d Add a few missing errcodes
They are used in the code but not defined in the SGML docs so the script
failed to parse them.
2014-07-31 13:34:53 +01:00
Daniele Varrazzo
081bf843d2 Parse the error codes from the text file if available
The text file was added in PG 9.1. It contains a few errors not available
in the SGML.
2014-07-31 13:33:36 +01:00
Daniele Varrazzo
56adc590ff Fixed segfault if COPY statements are executed
Close ticket #219
2014-06-06 21:42:21 +02:00
Daniele Varrazzo
115ceea1eb Don't ignore silently the cursor.callproc argument without a length 2014-06-06 21:42:21 +02:00
Daniele Varrazzo
e076e935b9 Added test with objects without length as callproc param 2014-06-06 21:42:20 +02:00
Chris Mildebrandt
693dedf4da cleanup remaining GPL license text 2014-05-20 09:50:53 -07:00
Chris Mildebrandt
67354ed14f cleanup remaining GPL license text 2014-05-20 09:42:41 -07:00
Jason Erickson
8746b0c6b7 Skip test_cleanup_on_badconn_close on Windows
The Windows server version of PostgreSQL uses a function called pgkill in the
file kill.c in place of the UNIX kill function.  This pgkill function
simulates some of the SIGHUP like commands by passing signals through a named
pipe.  Because it is passing the signal through a pipe, the server doesn't get
the kill signal immediately and therefore fails the test on
test_connection.ConnectionTests.test_cleanup_on_badconn_close.
Ideally, the test should check to see if the server is running on Windows, not
the psycopg.
2014-05-19 12:15:53 +01:00
Jason Erickson
c5f2e29dde Added select.select timeout on AsyncTests.wait
On Windows, the select.select() hangs/waits forever on the
test_async_connection_error_message() test.  Adding a 10 second timeout
allows the tests to continue.
2014-05-19 12:15:52 +01:00
Daniele Varrazzo
97290955f6 Python 3.4 declared supported 2014-05-13 14:36:28 +01:00
Daniele Varrazzo
d0b35adeb6 Parse the rowcount as long 2014-05-13 14:34:10 +01:00
Daniele Varrazzo
35545e7374 Skip rowcount on copy test on postgres < 8.2
It looks like the server doesn't send the message.
2014-05-13 14:34:09 +01:00
Daniele Varrazzo
81b5f1fb26 Copy operations correctly set the cursor.rowcount attribute
Fixes ticket #180.
2014-05-05 23:53:50 +01:00
Daniele Varrazzo
abd975ae40 set_session() params documented in a more Python-friendly way 2014-05-05 23:06:23 +01:00
Daniele Varrazzo
69605e54ec Fixed explicit connection.cursor(cursor_factory=None)
Fixes issue #210.
2014-04-30 17:57:55 +01:00
Daniele Varrazzo
03b8b1e97a Merge branch 'connection-closed'
NEWS for released 2.5.3 reordered.
2014-04-05 16:11:19 +01:00
Daniele Varrazzo
09fb131f1a Don't specify 0 or 1 in closed docs
There's also 2 which means broken. But I prefer to leave that as
implementation detail.
2014-04-05 16:03:19 +01:00
Daniele Varrazzo
489658cfc5 Close the connection if discovered bad on poll() 2014-04-05 16:03:19 +01:00
Daniele Varrazzo
1654687d1b Check the connection is really bad on exception before closing it
We end up here without a pgres sometimes (e.g. from lobject errors)
2014-04-05 16:03:06 +01:00
Daniele Varrazzo
3752880b7b Fixed attempt of closing an already closed lobject on dealloc
This results in a "null without exception set" in the corrent state, which
is caused by the connection being unexpectedly closed anyway.
2014-04-05 16:03:06 +01:00
Daniele Varrazzo
2e55b35d5d Don't set an exception witout GIL closing lobjects with a bad conn
We ended up in this branch only for an excessively aggressive closing
of the transaction that now I'm going to fix.
2014-04-05 16:03:06 +01:00
Daniele Varrazzo
696d123550 Close a connection if PQexec returned NULL
This happens for Socket connections, not for TCP ones, where a result
containing an error is returned and correctly handled by pq_raise()

Closes ticket #196 but not #192: poll() still doesn't change the
connection closed.
2014-04-05 16:03:06 +01:00
Daniele Varrazzo
a31c1a1722 Allow get_transaction_status on closed connections
It's a local operation and the libpq functions has a NULL guard.
2014-04-05 16:02:43 +01:00
Daniele Varrazzo
9036299d54 Avoid printing the typecast name in debug statement
The way we were doing it is unsafe and causes assertion failures on Py3.

Fixes ticket #188
2014-04-04 19:25:09 +01:00
Daniele Varrazzo
ca98167ae4 Fixed use of Python object with refcount 0 in cursor_init
Caused segfault running test_cursor.CursorTests.test_invalid_name under
Python 3.4 built in debug mode.
2014-04-04 19:20:08 +01:00
Daniele Varrazzo
81443c3a65 Work around pip issue #1630 breaking 'pip -e git+url'
https://github.com/pypa/pip/issues/1630

Fixes ticket #18 (opened in 2010!)
2014-04-04 18:07:05 +01:00
Daniele Varrazzo
33f2301772 Clarify in the docs that mogrify() and query always return bytes 2014-04-03 02:46:54 +01:00
Daniele Varrazzo
e9661bcde5 Fixed bug number typo in NEWS file 2014-04-03 02:45:57 +01:00
Daniele Varrazzo
a8fdc74090 Fixed overflow opening a lobject with an oid not fitting in a signed int
Fixes 🎫`203`.
2014-04-03 02:35:56 +01:00
Daniele Varrazzo
dfacc483b5 Dropped unneeded pass in test 2014-04-03 02:32:05 +01:00
Daniele Varrazzo
25e3a5f744 Explicit the fact that closed connections have undefined status 2014-04-03 02:07:38 +01:00
Daniele Varrazzo
e7fc7f31b9 Fixed dsn and closed attributes in failing connection subclasses.
From ticket #192 discussion.
2014-04-03 01:42:35 +01:00
Erwin de Keijzer
0258e90ef0 Fixed DNS typo in examples 2014-03-24 18:36:33 +01:00
Daniele Varrazzo
7b82be936d Don't segfault on uninitialized cursor
It can happen with bad cursor subclasses not calling super's init. Raise
an exception instead of segfaulting.

Closes #195
2014-02-26 19:41:59 +00:00
Daniele Varrazzo
618f7e41de Use the do-while 0 idiom for cursor guards macro 2014-02-26 19:31:27 +00:00
Daniele Varrazzo
3c893606f5 Merge branch 'ticket-194' 2014-02-24 15:20:13 +00:00
Daniele Varrazzo
79e84e432a Bug #194 confirmed fixed: newsfile updated. 2014-02-24 15:20:01 +00:00
Daniele Varrazzo
63e36e22d2 Set the connection async before polling for connection
It should fix ticket #194
2014-02-24 15:20:01 +00:00
Daniele Varrazzo
ca99579b76 Set the connection async earlier in green mode
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.
2014-02-24 15:20:01 +00:00
Daniele Varrazzo
283dbccf56 Merge branch 'range_sort' 2014-02-22 23:02:19 +00:00
Daniele Varrazzo
dd9e476353 Fixed error message on range parsing failed 2014-02-22 23:02:07 +00:00
Daniele Varrazzo
8d2744c550 Mention Range order in the news file 2014-02-22 23:01:22 +00:00
Daniele Varrazzo
212f4e3538 Docs wordsmithing about Range order 2014-02-22 23:01:02 +00:00