Daniele Varrazzo
d67d50b434
Fixed interaction between RealDictCursor and named cursors
...
Closes ticket #67 .
2011-09-12 02:20:53 +01:00
Daniele Varrazzo
29932c488f
errorcodes map updated to PostgreSQL 9.1
2011-08-22 17:29:14 +01:00
Federico Di Gregorio
880aa07a58
WITH HOLD documentation a argument parsing changes
...
Now any true value will do for the withhold parameter.
2011-08-10 19:21:12 +02:00
Federico Di Gregorio
a59d88c703
Merge remote-tracking branch 'piro/devel' into devel
2011-08-10 18:36:24 +02:00
Federico Di Gregorio
479bdf7458
New 'withhold' parameter for connection.cursor()
2011-08-10 18:25:46 +02:00
Daniele Varrazzo
1861e0010d
Fixed --static-libpq setup option (ticket #64 )
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
9870ca4dce
Fixed NamedTupleCursor.executemany() (ticket #65 )
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
a2ee25ecfe
Check the connection status before putting back into the pool
...
Rollback connections in transaction or in error.
Discard broken connections.
Closes ticket #62 .
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
11ff27b5af
Added documentation for putconn's close parameter
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
4fd5f3267b
Raise PoolError when putting a connection not belonging to the pool
...
A KeyError was raised instead.
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
de6f2ac387
Grab the GIL when checking for errors occurred
...
The problem was causing a segfault on BEGIN if the server is disconnected
after the connection is created.
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
d9fce1f837
Mention the lazy uuid import in the news file
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
e3b32dcee1
Bump to next dev version
2011-08-09 11:44:30 +01:00
Daniele Varrazzo
30a046c602
Fixed adaptation doc example
...
Close ticket #63
2011-07-24 20:42:23 +01:00
Federico Di Gregorio
2f6336ea78
First try at curs.withhold implementation
2011-07-05 10:28:34 +02:00
Marko Kreen
cb1d163f4f
lazy import for uuid module
...
Attached patch moves uuid import from inside try-except
to register_uuid function. Reason: uuid module import is *very*
heavy. It goes into OS searching for various .dll/.so libraries,
lauches 'ldconfig' and so on...
With this patch, 200x python -c 'import psycopg2.extras'
goes from 22s to 7s. (plain 'import psycopg2' is 6s)
--
marko
2011-06-28 17:28:43 +02:00
Federico Di Gregorio
f8ff2ccc49
Merge branch 'devel'
2011-06-13 18:53:48 +02:00
Federico Di Gregorio
f8a5dabdc1
Preparing release 2.4.2
2011-06-12 21:40:44 +02:00
Federico Di Gregorio
3ec9677978
Aligned casing of isolation levels with PostgreSQL documentation
2011-06-12 21:40:31 +02:00
Daniele Varrazzo
d76d136b4f
Introductory docs section on transaction control improved
...
Added big fat warning about idle in transaction and reference to
set_session().
2011-06-08 14:38:57 +01:00
Daniele Varrazzo
d2b28abced
Method set_transaction() renamed to set_session()
...
In fact it doesn't change "the transaction", as there has to be no
transaction when invoked. The effect instead is to execute SET SESSION
CHARACTERISTICS.
2011-06-08 14:22:11 +01:00
Daniele Varrazzo
1a51cfe274
Better error message if deferrable is used in PG < 9.1
2011-06-08 10:59:27 +01:00
Daniele Varrazzo
0a1bbb56cd
Dropped redundant semicolons at the end of internal queries
...
For consistency with other queries, and probably we give less work to do
to the server parser (a ridiculously tiny amount).
2011-06-08 09:22:35 +01:00
Daniele Varrazzo
5c13dac5ff
Merge branch 'setup-cleanup' into devel
2011-06-08 08:22:03 +01:00
Jason Erickson
5ee7bac66b
No manifest reinsertion into 2.4/2.5 with MSVC
...
Python versions 2.4 and 2.5 for MSVC on Windows do not need to manifest file
reinserted into the DLL. The VC compiler for these versions does not have the
mt.exe executable to insert the manifest file.
2011-06-08 08:21:32 +01:00
Daniele Varrazzo
178698f9e8
Merge branch 'setup-cleanup' into devel
2011-06-07 23:58:58 +01:00
Daniele Varrazzo
7b017e7944
Mention Steve and his work in the NEWS file
...
That's Steve's Job! :D
2011-06-07 23:58:37 +01:00
Daniele Varrazzo
dc92161dda
Delay detection of the compiler in setup.py
...
At init time, build_ext is not configured, so neither the --compiler option
nor settings in setup.cfg/distutil.cfg is effective.
Steve, I told you distutils was a mess :)
2011-06-07 23:28:17 +01:00
Daniele Varrazzo
d0b97feab3
More cleanup in pg_config detection from Windows registry
2011-06-07 22:35:22 +01:00
Steve Lacy
575afa2e0e
Properly detect pg_config.exe on Windows.
...
I'm fairly certain this is correct, submitting so I can pull on my Windows
box and do some testing there.
2011-06-07 22:35:22 +01:00
Steve Lacy
46dc7e66f8
Fix pg_config commandline option broken in a previous change
...
- Make sure to declare self.pg_config in initialize_options.
- Don't declare PostgresConfig in __init__, as its scope is limited.
- Pass build_ext instance to PostgresConfig to avoid having to
call the option parser directly.
2011-06-07 22:22:08 +01:00
Steve Lacy
57a6cf3144
Code to find an executable on the current PATH refactored
2011-06-07 22:18:56 +01:00
Daniele Varrazzo
6d907df14d
Fixed documentation for COPY methods
...
The size parameter in copy_from was undocumented (ticket #59 ).
2011-06-07 11:16:10 +01:00
Daniele Varrazzo
9b5ac79513
Fixed default size for read copy buffer
...
The original commit stated it should have been 8192.
2011-06-07 11:16:06 +01:00
Daniele Varrazzo
9a7aee3d05
Fixed compatibility problem in setup for Python 2.4
2011-06-07 08:58:54 +01:00
Steve Lacy
ef18915396
Unify the way the MSVC compiler is detected
...
And do it only once in __init__ instead of different ways
and in different places.
2011-06-07 08:41:57 +01:00
Steve Lacy
c826446ff8
Clean up a bunch of lint from pylint/pyflakes/pep8 checking
...
- Don't override global variable name "ext" (use "extension" as function
argument names)
- Improve function naming (get_compiler -> get_compiler_name)
- Other misc operator spacing and 80-column violation cleanup.
- Remove unneeded import (DistUtilsFileError)
2011-06-07 08:40:40 +01:00
Steve Lacy
f3526d0630
Refactoring of the pg_config detection code in setup.py
...
Pull all state and path searching into it's own class.
2011-06-07 08:40:19 +01:00
Daniele Varrazzo
816b5dda33
Merge branch 'copy-refcount-bug' into devel
2011-06-07 01:20:37 +01:00
Daniele Varrazzo
679af4a975
Fixed copyfile refcount in copy_expert
...
In case of early error, jumping to exit would have decref'd the borrowed
reference to file.
Issue spotted by Dave Malcolm, thanks!
2011-06-07 01:20:25 +01:00
Daniele Varrazzo
e9a485e30b
Merge branch 'copy-refcount-bug' into devel
2011-06-07 00:14:11 +01:00
Daniele Varrazzo
b6e710b0fc
Fixed refcount bug in copy_to() and copy_expert() methods too
2011-06-07 00:08:29 +01:00
Daniele Varrazzo
1888bf41c0
Added patch for refcount bug in copy_from
...
By Dave Malcolm. https://bugzilla.redhat.com/show_bug.cgi?id=711095
(slightly edited to increment the refcount before storing the pointer
in the cursor).
2011-06-07 00:08:29 +01:00
Daniele Varrazzo
2a1b2b5713
Added script to demonstrate the refcount bug during copy
...
from https://bugzilla.redhat.com/show_bug.cgi?id=711095
2011-06-07 00:08:29 +01:00
Jason Erickson
dd7ee7093a
No strcasecmp function with MSVC
...
The MSVC compiler does not have the strcasecmp(x, y) function, which is a
case insensitve string compare function. Instead, MSVC has a similar function,
lstrcmpi(x, y). Modified config.h to use this function when building with
MSVC.
2011-06-05 23:33:28 +01:00
Daniele Varrazzo
442a0606fe
Merge branch 'guc-cleanup' into devel
2011-06-05 16:31:25 +01:00
Daniele Varrazzo
709df38d79
Don't clobber an eventual Python exception set by a green thread
2011-06-05 16:30:37 +01:00
Daniele Varrazzo
869d48b6f0
Use the pqpath functions to get/set GUC parameters
...
Functions conn_setup(), conn_get_isolation_level(), conn_set_transaction(),
conn_switch_isolation_level(), conn_set_client_encoding() reimplemented
using the pqpath funtitons.
Dropped analogous function in the connection, as it had to take the lock,
thus it was hard to build consistent pieces of functionality with it.
2011-06-05 16:26:01 +01:00
Daniele Varrazzo
8f876d4b5d
Avoid a deadlock using concurrent green threads on the same connection
...
Use the async_cursor property to store an indication that something is
running (even if it is not necessarily a cursor running the query).
2011-06-05 16:22:54 +01:00
Daniele Varrazzo
cf6a4ec062
Added pqpath functions to get/set the value for GUC parameters
...
The aim of these function is to allow the connection to make a better use
of the pqpath functions instead of using PQexec for these small things.
Also, the functions are to be called with the connection lock: this makes
composing higher level functions using them easier.
2011-06-05 15:36:02 +01:00