Daniele Varrazzo
5748ae14bf
Test tweaked to deal with missing usecs in BC timestamps
...
Probably depending on compile time options. On my test db usecs
are available from PG 8.4.
2011-06-03 00:54:33 +01:00
Daniele Varrazzo
531292bca5
Merge branch 'neg-escape' into devel
2011-05-30 22:09:23 +01:00
Daniele Varrazzo
281427f450
Fixed escape for negative numbers prefixed by minus operator
...
Closes ticket #57 .
2011-05-30 22:00:20 +01:00
Daniele Varrazzo
19ec8809fd
Use all the isolation levels accepted by PostgreSQL
...
In PG 9.1 repeatable read and serializable are distinct levels.
2011-05-11 13:01:20 +01:00
Daniele Varrazzo
834c7d1288
Fixed a few docstrings mixed up
2011-05-11 12:59:31 +01:00
Daniele Varrazzo
af424821b7
Don't build mx.DateTime support if the module can't be imported
...
Previously we only checked for the existence of the include files, but this
doesn't imply the presence of the module. Particularly true in restricted
environments such as virtualenv.
Closes ticket #53 .
2011-05-11 12:59:31 +01:00
Daniele Varrazzo
c687f1d816
Bump to next development release
2011-05-11 12:59:31 +01:00
Federico Di Gregorio
ab685c2fc0
Merge branch 'devel'
2011-05-11 09:58:49 +02:00
Federico Di Gregorio
9080b30741
Preparing release 2.4.1
2011-05-11 09:58:34 +02:00
Daniele Varrazzo
de6aff31b8
Skip a test on the proper PG function
2011-04-27 12:18:50 +01:00
Daniele Varrazzo
c61ec094a3
Don't fetch all the records iterating a NamedTuple cursor on a named cursor
2011-04-26 19:26:19 +01:00
Daniele Varrazzo
ffa7a62b93
Fixed interaction between NamedTuple and named cursor
...
Build the nametuple after fetching the first resutl, or else
cursor.description will be empty.
2011-04-26 19:18:39 +01:00
Daniele Varrazzo
80891e64b3
Dropped unused import
2011-04-26 19:16:10 +01:00
Daniele Varrazzo
c08799b0b0
Fixed SystemError clobbering libpq errors raised without SQLSTATE
...
Bug vivisectioned by Eric Snow
<http://archives.postgresql.org/psycopg/2011-04/msg00019.php >.
2011-04-24 02:59:28 +01:00
Daniele Varrazzo
746afdf69f
Added missing vertical spaces in NEWS
2011-04-15 01:11:22 +01:00
Daniele Varrazzo
e316d7bcd4
Merge branch 'fix-encoding' into devel
2011-04-09 14:47:07 +01:00
Daniele Varrazzo
e3605b33c1
Updated NEWS with the connection encoding fix
2011-04-08 14:36:49 +01:00
Daniele Varrazzo
19653a88ec
Store a normalized version of the PG encoding in the connection
...
This way looking up into extensions.encodings will not break.
2011-04-08 13:48:11 +01:00
Daniele Varrazzo
88803695ac
Normalize the encoding name at connection
...
The encoding can be set by PGCLIENTENCODING, which may be an alternative
spelling. Bug reported by Peter Eisentraut.
At this point the idea of considering one of the random spellings such as
EUC_CN as somewhat "blessed" is debunked. So just store the cleaned-up
version of the encoding in the mapping table. Note that the cleaned-up
version was needed by the unicode adapter: this requirement has been
surpassed as the connection now contains a copy of the Python codec name
set whenever the client encoding is set.
2011-04-08 13:48:11 +01:00
Daniele Varrazzo
bf48706868
Don't check the test db exists at psycopg2.tests import time
2011-03-30 15:52:49 +01:00
Daniele Varrazzo
2dab7d52f2
Fixed bytea encoding tests skipping when ctypes is not available
2011-03-26 14:27:58 +00:00
Daniele Varrazzo
7716cc6a0c
Allow to specify --static-libpq on setup.py command line
...
Patch provided by Matthew Ryan (ticket #48 ).
2011-03-26 13:48:37 +00:00
Daniele Varrazzo
90536a187d
Merge branch 'bytea-parser' into devel
2011-03-26 13:02:57 +00:00
Daniele Varrazzo
da58bee70a
Added documentation for the bytea parser
2011-03-26 12:59:15 +00:00
Daniele Varrazzo
e0cd6f0f00
Added tests for our own bytea parser
...
Because the parse function is not supposed to be exposed in Python,
use ctypes to directly inspect the C function.
2011-03-26 12:59:14 +00:00
Daniele Varrazzo
66c543b16c
Parse bytea output format ourselves instead of using the libpq
...
PG 9.0 uses the hex format by default, and clients < 9.0 can't parse that
format, requiring client update and great care in what is linked at runtime,
and generally giving headache to users and transitively us.
2011-03-26 12:59:14 +00:00
Daniele Varrazzo
f34e44b3f4
Merge branch 'empty-query' into devel
2011-03-04 20:33:51 +00:00
Daniele Varrazzo
fcbe0466a6
Correctly detect an empty query sent to the backend
...
Closes ticket #46 .
2011-03-04 20:30:43 +00:00
Daniele Varrazzo
f1d69f6dec
Fixed detection of empty error from pq_raise
...
Avoid a system error in case err is set to an empty string.
2011-03-04 20:20:56 +00:00
Daniele Varrazzo
4a8b5f98f3
Bump to work on 2.4.1
2011-03-04 20:18:22 +00:00
Federico Di Gregorio
29f83f05c4
Merge branch 'devel'
2011-02-27 13:03:48 +01:00
Federico Di Gregorio
2212ea96a6
Preparing release 2.4
...
* NEWS file now uses 72 columns (better in emails and posts)
* Bumped versions
* Updated MonoDevelop file
2011-02-27 12:52:00 +01:00
Daniele Varrazzo
194447fbbf
Merge branch 'msvc-cleanup' into devel
...
Merged Jason Erickson devel branch after collapsing a few commits together
where it made sense.
2011-02-25 10:29:19 +00:00
Jason Erickson
2997c0eb6c
Windows MSVC: 64bit compiler sees 2 export symbols
...
The MSVC compiler sees a request for the main symbol (init__pyscopg) to be
exported twice during the build process and issues a warning in 64bit mode.
One symbol is from distutils exporting the library with the
build_ext.get_export_symbols() function, the other is from the #define
PyMODINIT_FUNC (define in pyport.h) that begins the main _psycopg module.
This patch overrides the get_export_symbols function and returns an empty
array of symbols to export if the compiler is MSVC.
2011-02-25 10:25:12 +00:00
Jason Erickson
7c2fa77c4b
Windows MSVC: Fixed warning of incompatible types
...
Fixed incompatible type warning from XidObject * to PyObject * by
casting.
2011-02-25 10:25:12 +00:00
Jason Erickson
961e855bbd
Windows MSVC: Fix Compiler Warning: getpid
...
Fix a compiler warning when using PSYCOPG_DEBUG on MSVC where getpid is
undefined.
2011-02-25 10:25:12 +00:00
Jason Erickson
631883f62f
Windows MSVC: Fix data loss compiler warnings
...
Fixed MSVC compiler warnings where it was indicating a conversion
from a larger data type to smaller data type might have data loss.
2011-02-25 10:25:12 +00:00
Daniele Varrazzo
9e00196165
Fixed use of the new return value of HstoreAdapter.get_oids()
2011-02-25 01:37:02 +00:00
Daniele Varrazzo
5211e1474b
Don't limit the hstore search to the public schema only
...
Looks like there is a case for installing hstore somewhere else (see
ticket #45 ). And after all the typecaster can be registered on a list of
OIDs, so let's grab them all.
2011-02-25 00:19:49 +00:00
Daniele Varrazzo
29ac03ef04
Check for failed allocation in the notice callback
2011-02-24 10:14:06 +00:00
Daniele Varrazzo
343687ebc8
Fixed runtests -> check in INSTALL file
2011-02-24 10:10:27 +00:00
Jason Erickson
6f0dfe6d2d
Windows MSVC: Remove /Wp64 compiler flag
...
Remove the /Wp64 flag since it is deprecated starting in Visual Studio 2008.
2011-02-23 14:29:44 -07:00
Daniele Varrazzo
f9862211b1
NEWS for release 2.4 ordered in groups
2011-02-23 14:23:34 +00:00
Daniele Varrazzo
894d3f653c
Raise an exception if the libpq fails to decode bytea in hex format
2011-02-23 14:04:27 +00:00
Daniele Varrazzo
c01a7edbf4
Fixed test for execution with older PostgreSQL versions
2011-02-23 08:43:01 +00:00
Daniele Varrazzo
f96b68d8c6
Fixed docstring for connection.lobject()
2011-02-23 01:53:56 +00:00
Daniele Varrazzo
1db9c9b8ce
The cursor name can be a non-valid PostgreSQL identifier
2011-02-23 01:53:25 +00:00
Daniele Varrazzo
66555c5f11
Fixed call of memory functions without the GIL
2011-02-23 00:48:10 +00:00
Daniele Varrazzo
20f714f17c
Added error checking to _pq_fetch_tuples()
2011-02-23 00:32:23 +00:00
Daniele Varrazzo
c1715f66fe
More careful memory management
...
- Check return value of PyErr_Malloc and set an exception in case of error
- Avoid exposing variables with refcount 0 as connection attributes.
- PyErr_Free guards itself for NULL input
2011-02-23 00:32:23 +00:00