Commit Graph

711 Commits

Author SHA1 Message Date
Daniele Varrazzo
7e482756c5 Use PQfreemem to free memory allocated by the libpq.
Bug reported by Anton Kovalev.
2010-10-08 14:26:40 +01:00
Daniele Varrazzo
6e71b3db05 Dropped PSYCOPG_OWN_QUOTING.
It was deprecated for version 2.1. There are bugs to be fixed made more
complex by its presence and it doesn't keep into account PostgreSQL 9.0
new binary format.

Time to go!
2010-10-08 12:27:47 +01:00
Daniele Varrazzo
baf65a0dda Fixed access to freed memory in conn_get_isolation_level().
Bug reported by Anton Kovalev.
2010-10-08 12:02:53 +01:00
Daniele Varrazzo
850cd97ab3 A few doc fixes. 2010-10-08 10:16:59 +01:00
Daniele Varrazzo
bc2aefeacf cursor.mogrify() accepts unicode queries. 2010-10-05 03:13:44 +01:00
Daniele Varrazzo
5b4d366f4e Common code in execute() and mogrify() merged. 2010-10-05 01:43:23 +01:00
Daniele Varrazzo
575b2b5f77 The Inet type knows how to adapt itself.
Implemented __conform__ as the Adaptation PEP suggests. It is not
required for the type to be registered as adapter.
2010-09-25 23:55:55 +01:00
Daniele Varrazzo
75a6f783c5 Added PostgreSQL 9.0 error codes. 2010-09-23 23:43:23 +01:00
Daniele Varrazzo
b072a04c9c DBAPI compatibility test updated to 1.12.
Nothing major: Python 3.0 compatibility fixes.
2010-09-23 23:36:58 +01:00
Daniele Varrazzo
2081ceffde Don't execute a ROLLBACK on close()/GC.
The command wasn't sent since 2.2.0 due to a bug, but after a ML
discussion this behaviour proved more correct so the bug has become a
feature.
2010-09-23 23:28:30 +01:00
Daniele Varrazzo
cb1ef242a0 Bump to version 2.2.3-devel. 2010-09-23 23:27:55 +01:00
Daniele Varrazzo
bf9e557a71 Fixed typo in docs. 2010-09-23 23:17:32 +01:00
Daniele Varrazzo
19ae49e79e Refer to PostgreSQL 9.0 documentation. 2010-09-23 23:14:39 +01:00
Daniele Varrazzo
80ebb14df4 Use stable anchors to reference PostgreSQL docs. 2010-09-23 23:13:59 +01:00
Daniele Varrazzo
9b3aa290d2 Added missing import required by Sphinx 1.0. 2010-08-05 01:08:21 +01:00
Daniele Varrazzo
660b75c2f4 Typo fixed. 2010-08-04 23:26:52 +01:00
Federico Di Gregorio
c3b835929b Preparing release 2.2.2 2010-07-18 12:32:45 +02:00
Federico Di Gregorio
557608f715 Applied spelling fixes patch from Peter Eisentraut 2010-07-18 12:14:46 +02:00
Federico Di Gregorio
b263fbf274 Added deprecation warning to register_tstz_w_secs 2010-07-13 14:26:52 +02:00
Daniele Varrazzo
deb2d9050f Exceptions raised by the columns iterator propagated. 2010-07-10 00:12:50 +01:00
Daniele Varrazzo
cb8128c6d4 Added test to verify copy_from() with columns. 2010-07-10 00:04:54 +01:00
Daniele Varrazzo
927f2bb1f1 Dropped logging.basicConfig() call.
It messes up with projects using logging but where no handler is
installed on the root logger.  Bug reported by Joe Abbate.
2010-07-09 23:23:10 +01:00
Daniele Varrazzo
3773b50bb3 Propagate iterable exceptions to the executemany caller. 2010-07-09 23:22:35 +01:00
Daniele Varrazzo
bd6a4139da Added test to verify executemany doesn't propagate exceptions. 2010-07-09 15:23:02 +01:00
Daniele Varrazzo
4a78e4068b Dropped register_tstz_w_secs() implementation.
The function is no-op now that the default type caster can deal with
seconds in the tz offset.
2010-05-20 02:18:04 +01:00
Daniele Varrazzo
305d86f38a Handle time zones with seconds in the UTC offset.
The offset is rounded to the nearest minute.
2010-05-20 02:16:04 +01:00
Daniele Varrazzo
e3d489f701 Bump to version 2.2.2-devel.
The -devel suffix appears in the docs we publish on the website, so it's
clear that they refer to the upcoming version.
2010-05-20 02:03:07 +01:00
Daniele Varrazzo
eacf6febfe Warn on declarations not at beginning of the block.
They are accepted by gcc but not by MS compilers.
2010-05-19 11:40:38 +01:00
Daniele Varrazzo
b597ccf917 Tests can be run again different coroutine libraries.
Use PSYCOPG2_TEST_GREEN=<something>, where <something> is 1 or a library
name. Currently eventlet is supported.
2010-05-19 11:40:13 +01:00
Federico Di Gregorio
23391a3c55 Preparing release 2.2.1 2010-05-17 21:51:25 +02:00
Jason Erickson
069695b4ae Additional Library for Windows linking and OpenSSL 1.0.0
Added the linking of crypt32.lib to the windows SSL build, as it seems that the current version of OpenSSL is looking for crypt32.lib as well.
2010-05-17 09:06:29 +02:00
Jason Erickson
1f1133b871 Micrsoft Visual C Compile Fix
Moved the declarations of variables/pointers to the beginning of the block, where MSVC wants them.
2010-05-17 09:06:14 +02:00
Federico Di Gregorio
e286970b62 Preparing release 2.2.0 2010-05-16 12:55:59 +02:00
Federico Di Gregorio
6521fb5a44 Fixed error related to calling C typecasters from Python ones 2010-05-15 19:34:56 +02:00
Federico Di Gregorio
36cbefdee1 Updated project and version for release 2.2.0 2010-05-15 17:51:54 +02:00
Daniele Varrazzo
a35498532a Fixed time test to be independent from the TZ it runs. 2010-05-15 14:27:24 +01:00
Daniele Varrazzo
c46a1dad63 Fixed TimeFromTicks for second values > 59.5. 2010-05-15 14:27:24 +01:00
Daniele Varrazzo
afea19651c Fixed TimestampFromTicks for second values > 59.5.
Bug reported and fixed by Jozsef Szalay on 2010-05-06 at 14:11:59.999920.
2010-05-15 14:27:24 +01:00
Daniele Varrazzo
b04bf41f99 Fixed decimal to float recipe to avoid using FLOAT.
FLOAT seems not working with NULLs.
2010-05-15 14:27:24 +01:00
Daniele Varrazzo
5e3f240ac9 Cast datetime into timestamptz when the tzinfo field is set. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
60e7522e47 Added evaluable representation for the FixedOffsetTimezone object. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
d30daac782 Fixed typo in LocalTimezone doc. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
bf1c76b792 Explicit cast of the SQL representation of time-related objects.
Allow the objects to be recognized as the proper type by Postgres in not
strong contexts: problem reported by Peter Eisentraut.

Added tests to check the types are respected in a complete Py -> PG ->
Py roundtrip without context.
2010-05-15 14:27:23 +01:00
Daniele Varrazzo
e8c2a14362 Added typecasters for arrays of specific MX/Py time-related types. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
c8aef26e15 Adapt buffer objects using an explicit cast on the string literal.
Don't rely on Postgres casting the literal according to the context:
this doesn't work e.g. passing the object as function argument where a
function with the same name but taking a text exists. It doesn't work
either when the object is in an ARRAY construct.

Added test to check the type is respected in a complete Py -> PG -> Py
roundtrip without context.

Bug and solution reported by Peter Eisentraut.
2010-05-15 14:27:23 +01:00
Daniele Varrazzo
2020790ba1 Typo fixed. 2010-05-15 14:27:02 +01:00
Daniele Varrazzo
73db6bee01 Keep the connection in blocking mode unless it is not async.
Dropped set/unset nonblocking mode for copy and lobject operations:
lobjects don't work in nonblocking mode so they will hardly be supported
in green/async branches.  Support for copy is still feasible, but it
will be done in other code paths (called by poll).
2010-05-09 20:37:48 +01:00
Daniele Varrazzo
e29424a230 Dropped large object support when psycopg is in green mode.
Async mode and large object are not compatible, albeit I haven't found
an authoritative source yet.
2010-05-09 20:34:02 +01:00
Daniele Varrazzo
2596cf7125 Simplified psyco_wait() function interface. 2010-04-25 23:08:08 +01:00
Daniele Varrazzo
8efa1fa6af Dropped compiling warning. 2010-04-25 23:08:08 +01:00