Commit Graph

1689 Commits

Author SHA1 Message Date
Daniele Varrazzo
77df287e14 More tests tweaks
Named cursors on old server versions have a different prefetch behaviour.
This has hidden me the supported range of the 24:00 time format.
Let's have another go at full testing...
2015-02-08 12:50:31 +00:00
Daniele Varrazzo
a2a5461c28 Make Column picklable on Python >= 3.3
Also expose the type from the extensions module, not from the main
module.
2015-02-08 12:04:15 +00:00
Daniele Varrazzo
9f7cd6b374 Don't test date 24:00 before PG 8.4 2015-02-08 10:31:28 +00:00
Daniele Varrazzo
afba29480a Added NEWS note about picklable cursor.desciption 2015-02-08 02:36:29 +00:00
Owen Raccuglia
28180837bf Allow pickling of cursor.description
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.
2015-02-08 02:36:13 +00:00
Daniele Varrazzo
66fdaeaf09 Propagate read error messages in COPY FROM
Fix ticket #270.
2015-02-08 01:43:37 +00:00
Daniele Varrazzo
7c5bc1b6cf Convert Postgres time 24:00 into 00:00
Fix ticket #278.
2015-02-08 00:42:31 +00:00
Erik Lee
e39bf0fd6e Correct exausted -> exhausted typo 2014-12-25 13:28:40 +01:00
Asmund Tokheim
141e922d80 Correction to type adaption example, making it more transparent 2014-12-25 13:28:12 +01:00
Daniele Varrazzo
e3c6b46416 Don't try to close the server cursor in error state
`close()` is implicitly called by `__exit__()`, so an exit on error
would run a query on a inerr connection, causing another exception
hiding the original one. The fix is on `close()`, not on `__exit__()`,
because the semantic of the latter is simply to call the former.

Closes #262.
2014-09-16 06:51:46 +01:00
Daniele Varrazzo
d6688b6689 In 2010 I couldn't speak English 2014-09-11 12:08:11 +01:00
Tomer Chachamu
839e4abf39 Fix typo in docs 2014-09-01 16:26:23 +01:00
Daniele Varrazzo
6d5e6c047d Added scripts to release and upload docs 2014-09-01 16:26:23 +01:00
Daniele Varrazzo
32fc4bf199 Bump to next dev release 2014-08-31 02:30:21 +01:00
Daniele Varrazzo
00cafbe85b Version changed for release 2.5.4 2014-08-30 18:26:21 +01:00
Daniele Varrazzo
75bce3e39a Release notes cleanup before releasing 2.4.5
Also tweaked tickets remapping offset.
2014-08-30 18:23:24 +01:00
Daniele Varrazzo
7d312e2da9 Fixed excessively strict notices test
Failing with PG 9.4 because it generates other debug messages during the
test run (rehashing catalog cache).
2014-08-30 14:30:20 +01:00
Daniele Varrazzo
11c9fcb9d4 Merge branch 'drop-lighthouse' into maint_2_5 2014-08-28 17:08:17 +01:00
Daniele Varrazzo
a676b7d08f Migrate more tickets and further away
Starting the import operation now...
2014-08-28 13:21:33 +01:00
Daniele Varrazzo
0715771845 Dropped creation of errcodes with missing spec field
On further inspection these names are just aliases for values already
defined: we don't need the duplication.
2014-08-28 02:05:54 +01:00
Daniele Varrazzo
380f7ee4fd Clear adapters in test to maintain reference count 2014-08-26 03:56:09 +01:00
Daniele Varrazzo
8cf30509ad Fixed memory leak with large objects
Deallocating closed large objects failed to decrement the connection
refcount. The fact the lobject is closed doesn't matter for refcount.
Issue detected by the always useful scripts/refcounter.py

With an extra bit of unrequested whitespace love.
2014-08-26 03:56:07 +01:00
Daniele Varrazzo
3dad8344c0 Added test to verify _psycopg can be imported 2014-08-26 03:55:47 +01:00
Daniele Varrazzo
b12f6a9135 Don't import psycopg2.tz into the C extension
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.
2014-08-26 03:26:59 +01:00
Daniele Varrazzo
284677ae0a Dropped content from the INSTALL file
The docs have it right.
2014-08-24 23:24:58 +01:00
Daniele Varrazzo
af7789b40c Added info about running the test suite in the docs
They were in the INSTALL file, which is quite out-of-date now.
Also fixed a couple of other things.
2014-08-24 23:24:52 +01:00
Daniele Varrazzo
72a121c78f Self-updating copyright year in docs 2014-08-24 23:11:53 +01:00
Daniele Varrazzo
f751c27208 Document we known 9.4 errorcodes 2014-08-24 22:11:40 +01:00
Daniele Varrazzo
3775a9d95d Fixed doc example about Error attributes
Catch the Error, not everything!

Also, whitespaces.
2014-08-24 22:08:50 +01:00
Daniele Varrazzo
2231578922 Added plural version of the tickets role 2014-08-24 02:39:09 +01:00
Daniele Varrazzo
baf1ad251e Point tickets to GitHub instead of Lighthouse
Keep into account the numbers reshuffling: Lighthouse bugs with a number
matching a GitHub merge request are shifted ahead.
2014-08-24 02:37:01 +01:00
Daniele Varrazzo
cafae16072 Merge branch 'withhold-transactions' into maint_2_5 2014-08-21 05:47:17 +01:00
Daniele Varrazzo
c114aff435 Document WITH HOLD corrections. 2014-08-21 05:46:57 +01:00
Alexey Borzenkov
e08be44db7 Allow using named with hold cursors in autocommit 2014-08-21 05:15:01 +01:00
Daniele Varrazzo
75a0b2ffe2 Added test to verify withhold cursors work in autocommit 2014-08-21 05:14:20 +01:00
Alexey Borzenkov
d131b2b22b No implicit transaction on named cursor close
Also, don't start an implicit transaction when fetching with
named with hold cursor, since it already returns results
from a previously committed transaction.
2014-08-21 05:05:54 +01:00
Daniele Varrazzo
18d67a73d5 Added test to verify withhold transaction behaviour
A withhold cursor can read its data when the transaction is closed, so
it shouldn't start a new one upon movement/close.
2014-08-21 05:05:54 +01:00
Daniele Varrazzo
0e44198a8f Fixed segfault in List function
This function is never called: it segfaults 100%. To be removed.
2014-08-15 02:11:43 +01:00
Daniele Varrazzo
756c6f1838 Scrape PostgreSQL 9.4 error codes table too
No new error code found as of 9.4 beta2.
2014-08-13 02:45:45 +01:00
Daniele Varrazzo
d232f25a68 Convert pool arguments to int
Failing to do so may cause dangerous misbehaviours such as an unbounded
pool (because of lame comparison operators in Python 2).

Fix ticket #220.
2014-08-13 02:37:00 +01:00
Daniele Varrazzo
f9518e42b9 Document PostgreSQL 9.4 as supported
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.
2014-08-13 02:07:33 +01:00
Daniele Varrazzo
9acc1ba882 Merge branch 'jsonb' into maint_2_5 2014-08-13 01:59:15 +01:00
Daniele Varrazzo
774c1ff151 Habemus jsonb 2014-08-13 01:58:28 +01:00
Daniele Varrazzo
0f48a5e8b8 Added jsonb docs 2014-08-13 01:52:55 +01:00
Daniele Varrazzo
14b8c411be Add register_default_jsonb() and register the type 2014-08-13 01:52:55 +01:00
Daniele Varrazzo
cd965fe431 Added name param to register_json() 2014-08-13 00:45:10 +01:00
Daniele Varrazzo
ba1409d419 Added wishful test suite for jsonb type 2014-08-13 00:29:58 +01:00
Daniele Varrazzo
f434d87ef1 Fix supported Py/PG versions in docs 2014-08-04 22:39:41 +01:00
Daniele Varrazzo
0b06ebbf40 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:52 +01:00
Daniele Varrazzo
f82d9d4db3 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:35:52 +01:00