Commit Graph

1368 Commits

Author SHA1 Message Date
Daniele Varrazzo
50b445fa12 Merge branch 'array-typecast' into devel 2011-09-22 20:00:08 +02:00
Daniele Varrazzo
8963b8adcb Added support for arrays of composite types 2011-09-22 19:57:42 +02:00
Daniele Varrazzo
2f9ceeac64 Added support for arrays of hstores 2011-09-22 19:56:58 +02:00
Daniele Varrazzo
c4e6d7d982 Fixed typecasting of arrays containing consecutive backslashes 2011-09-22 18:14:16 +01:00
Daniele Varrazzo
e3054ac9f3 Added new_array_type() function
Allows the creation of a generic array typecaster from Python.
2011-09-22 15:51:21 +01:00
Daniele Varrazzo
6c8051907c Fixed doc blocks
Raise error with docutils 0.8.1. Probably docutils 0.7 was more lenient.
2011-09-22 15:50:50 +01:00
Daniele Varrazzo
cd6e2cd8f2 Don't leak private variables into the psycopg2.extensions interface 2011-09-22 14:34:14 +01:00
Daniele Varrazzo
8fb08efae7 Allocate dynamically memory for the list of columns in COPY
Some bloke finds the limit of 8K too restrictive... ticket #68.
2011-09-12 02:21:59 +01:00
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