Introduced in 2.0 beta 8, 2006 A.D. Went absolutely untouched in 8 years
of refactoring, when Python 2.5 and PostgreSQL 8.1 roamed the earth.
I would say it has stood the test of the time.
Building without extensions has been long broken and nobody really cares
about a pure-DBAPI implementation (which could be created using a wrapper
instead).
Also, don't start an implicit transaction when fetching with
named with hold cursor, since it already returns results
from a previously committed transaction.
The default repr is enough: it prints <TypeName at 0xADDR> instead of
<TypeName object at 0xADDR>.
The only people being hurt by this change are the ones using doctests:
they deserve it.
Actually there is a test failing in the test suite in PG 9.4beta2, but
it's probably because the default logging level is to DEBUG. Will wait
for the final release to check if the test is to be fixed. All other
tests pass no problem.
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.
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.
The prior implementation would adapt the types, and the following would happen:
input: {'foo': True, 'bar': "baz"}
output: hstore(ARRAY['foo', 'bar'], ARRAY[true, 'baz'])
The output value of foo is a boolean type, which is not acceptable in an hstore (at least not with this creation method).
Anyways, coercing everything to a string solves the issue. I am using the unicode function to make the tests happy.
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.