1 2003-07-26 Federico Di Gregorio <fog@debian.org>
5 * ZPsycopgDA/db.py: added _cursor method that checks for self.db
6 before returning a new cursor. Should fix problem reported with
9 2003-07-23 Federico Di Gregorio <fog@debian.org>
11 * cursor.c: applied notify and fileno patch from Vsevolod Lobko.
13 2003-07-20 Federico Di Gregorio <fog@debian.org>
15 * cursor.c (_mogrify_dict): applied (slightly modofied) patch from
16 Tobias Sargeant: now .execute() accept not only dictionaries but
17 every type that has a __getitem__ method.
19 2003-07-13 Federico Di Gregorio <fog@debian.org>
23 * cursor.c (psyco_curs_scroll): added scroll method, patch from
26 * typemod.c (new_psyco_quotedstringobject): discard NUL characters
27 (\0) in quoted strings (fix problem reported by Richard Taylor.)
29 2003-07-10 Federico Di Gregorio <fog@debian.org>
31 * Added python-taylor.txt in doc directory: very nice introduction
32 to DBAPI programming by Richard Taylor.
34 2003-07-09 Federico Di Gregorio <fog@debian.org>
36 * cursor.c (_psyco_curs_execute): another MT problem exposed and
37 fixed by Sebastien Bigaret (self->keeper->status still LOCKED
38 after a fatal error during PQexec call.)
40 2003-06-23 Federico Di Gregorio <fog@debian.org>
44 * ZPsycopgDA/db.py (DB.query): stupid error making ZPsycopgDA
45 unusable fixed (else->except).
47 2003-06-22 Federico Di Gregorio <fog@debian.org>
49 * Release 1.1.5 candidate.
51 * cursor.c (psyco_curs_copy_to): now any object with the write
52 method can be used as a copy_to target.
54 2003-06-20 Federico Di Gregorio <fog@debian.org>
56 * cursor.c (psyco_curs_copy_from): applied patch to allow copy_to
57 from any object having a "readline" attribute (patch from Lex
58 Berezhny.) (psyco_curs_copy_from): another patch from Lex to make
59 psycopg raise an error on COPY FROM errors.
61 * ZPsycopgDA/db.py (DB.query): if a query raise an exception,
62 first self._abort() is called to rollback current
63 "sub-transaction". this is a backward-compatible change for
64 people that think continuing to work in the same zope transaction
65 after an exception is a Good Thing (TM).
67 * finally updated check_types.expected. checked by hand the
68 conversions work the right way.
70 * doc/examples/work.py: fixed example. note that it is a long time
71 (at least two releases) that psycopg does not END a transaction
72 initiated explicitly by the user while in autocommit mode.
74 2003-06-19 Federico Di Gregorio <fog@debian.org>
76 * cursor.c (_mogrify_dict): fixed dictionary mogrification (patch
77 by Vsevolod Lobko.) (_psyco_curs_execute): fixed keeper status
78 trashing problem by letting only one thread at time play with
79 keeper->status (as suggested by Sebastien Bigaret.)
81 2003-05-07 Federico Di Gregorio <fog@debian.org>
85 * cursor.c: Added "statusmessage" attribute that holds the backend
86 message (modified lots of functions, look for self->status).
88 2003-05-06 Federico Di Gregorio <fog@debian.org>
90 * typemod.c (new_psyco_datetimeobject): moved Py_INCREF into
91 XXX_FromMx functions, to fix memory leak reported by Jim Crumpler.
93 2003-04-11 Federico Di Gregorio <fog@debian.org>
95 * module.h (PyObject_TypeCheck): fixed leak in python 2.1
98 2003-04-08 Federico Di Gregorio <fog@debian.org>
100 * buildtypes.py (basic_types): removed LXTEXT (never user, does
103 2003-04-07 Federico Di Gregorio <fog@debian.org>
105 * setup.py: added very lame setup.py script.
107 2003-04-02 Federico Di Gregorio <fog@debian.org>
111 * psycopg.spec: Added (but modified) spec file by William
112 K. Volkman (again, this change was lost somewhere in time...)
114 2003-04-01 Federico Di Gregorio <fog@debian.org>
116 * cursor.c (_psyco_curs_execute): psycopg was reporting everything
117 as IntegrityError; reported and fix suggested by Amin Abdulghani.
119 2003-03-21 Federico Di Gregorio <fog@debian.org>
121 * cursor.c (psyco_curs_fetchone): debug statements sometimes made
122 psycopg segfault: fixed by a patch by Ken Simpson.
124 2003-03-18 Federico Di Gregorio <fog@debian.org>
126 * cursor.c (alloc_keeper): patch from Dieter Maurer to unlock GIL
127 whaile calling PQconnectdb().
129 2003-03-05 Federico Di Gregorio <fog@debian.org>
133 * Applied cygwin patch from Hajime Nakagami.
135 2003-02-25 Federico Di Gregorio <fog@debian.org>
139 * cursor.c: added .lastrowid attribute to cursors (lastoid is
140 deprecated and will be removed sometime in the future.)
142 * cursor.c (begin_pgconn): implemented various isolation levels
143 (also, in abort_pgconn, commit_pgconn.)
145 * Added keyword parameters to psycopg.connect(): all take strings
146 (even port): database, host, port, user, password.
148 * configure.in: fixed test for postgres version > 7.2.
150 * cursor.c (_psyco_curs_execute): removed if on pgerr in default
151 case (if we enter default pgerr can't be one of the cased ones.)
152 Also applied slightly modified patch from William K. Volkman.
154 2003-02-24 Federico Di Gregorio <fog@debian.org>
156 * Merged in changes from 1.0.15.1 (see below for merged
159 2003-02-14 Federico Di Gregorio <fog@debian.org>
163 * cursor.c (_mogrify_fmt): in some cases we where removing one
164 character too much from the format string, resulting in BIG BAD
167 2003-02-13 Federico Di Gregorio <fog@debian.org>
169 * Release 1.0.15. <g>
171 * connection.c (_psyco_conn_close): now call dispose_pgconn on all
172 cursors, to make sure all phisical connections to the db are
173 closed (problem first reported by Amin Abdulghani.)
175 * DBAPI-2.0 fixed mainly due to Stuart Bishop:
176 - cursor.c (psyco_curs_setinputsizes): removed PARSEARGS, as
177 this method does nothing.
178 - cursor.c (psyco_curs_setoutputsize): .setoutputsize was
179 spelled .setoutputsizes! fixed. Also removed PARSEARGS, as this
182 2003-02-12 Federico Di Gregorio <fog@debian.org>
184 * module.h (Dprintf): check on __APPLE__ to avoid variadic macros
185 on macos x (as reported by Stuart Bishop, btw, why gcc seems to
186 not support them on macos?)
188 * cursor.c (_mogrify_fmt): non-alphabetic characters are dropped
189 after the closing ")" until a real alphabetic, formatting one is
190 found. (Fix bug reported by Randall Randall.)
192 2003-02-05 Federico Di Gregorio <fog@debian.org>
194 * typeobj.c (psyco_INTERVAL_cast): patched again to take into
195 account leading zeroes.
197 2003-02-02 Federico Di Gregorio <fog@debian.org>
199 * Makefile.pre.in: applied patch from Albert Chin-A-Young to
202 * README: added explicit permission to link with OpenSSL.
204 2003-01-30 Federico Di Gregorio <fog@debian.org>
206 * config.h.in: applied patch from Albert Chin-A-Young to fix
209 2003-01-29 Federico Di Gregorio <fog@debian.org>
211 * cursor.c (_mogrify_seq): fixed little refcount leak, as
212 suggested by Yves Bastide.
214 2003-01-24 Federico Di Gregorio <fog@debian.org>
216 * Merged-in changes from 1.0.14.2 (emacs diff mode is great..)
220 * ZPsycopgDA/db.py (DB.query): back to allowing up to 1000 db
221 errors before trying to reopen the connection by ourselves.
223 * ZPsycopgDA/db.py: a false (None preferred, 0 allowed) max_rows
224 value now means "fetch all results".
226 2003-01-22 Federico Di Gregorio <fog@debian.org>
228 * cursor.c (psyco_curs_fetchone): fixed little memory leak
229 reported by Dieter Maurer.
231 2003-01-20 Federico Di Gregorio <fog@debian.org>
233 * ZPsycopgDA/db.py (DB.tables/columns): added registration with
234 Zope's transaction machinery.
238 * ZPsycopgDA/db.py: applied some fixes and cleanups by Dieter
239 Maurer (serialization problem were no more correctly detected!)
245 * Import of 1.1.1 done.
247 * Moved everything to cvs HEAD.
249 2003-01-20 Federico Di Gregorio <fog@debian.org>
251 * ZPsycopgDA/connectionAdd.dtml: fixed typo (thanks to Andrew
254 * typeobj.c (psyco_INTERVAL_cast): applied patch from Karl Putland
255 to fix problems with fractional seconds.
257 2002-12-03 Federico Di Gregorio <fog@debian.org>
259 * Release 1.0.14-pre2.
261 * module.h: added macro for PyObject_TypeCheck if python version <2.2.
263 * typeobj.c (psyco_DBAPITypeObject_coerce): added error message to
266 2002-12-02 Federico Di Gregorio <fog@debian.org>
268 * Release 1.0.14-pre1.
270 * ZPsycopgDA/db.py (DB.sortKey): added sortKey().
272 * ZPsycopgDA/DA.py: applied a patch that was lost on hard disk
273 (sic), if you sent me a patch names psycopg-1.0.13.diff modifying
274 DA.py imports and want your name here, send me an email. :)
275 [btw, the patch fix the ImageFile import, getting it from Globals
278 * typeobj.c (psyco_DBAPITypeObject_coerce): Fixed coerce segfault
279 by checking explicitly for all the allowed types.
281 2002-11-25 Federico Di Gregorio <fog@debian.org>
283 * doc/examples/*.py: added .rollback() to all exceptions before
284 deleteing the old table.
286 * cursor.c: Apllied patch from John Goerzen (fix memory leak in
289 2002-10-25 Federico Di Gregorio <fog@debian.org>
293 * connection.c (_psyco_conn_close): remove cursors from the list
294 starting from last and moving backward (as suggested by Jeremy
295 Hylton; this is not such a big gain because python lists are
296 *linked* lists, but not removing the element 0 makes the code a
299 * cursor.c (_psyco_curs_execute): now IntegrityError is raised
300 instead of ProgrammingError when adding NULL values to a non-NULL
301 column (suggested by Edmund Lian) and on referential integrity
302 violation (as per debian bug #165791.)
304 * typeobj.c (psyco_DATE_cast): now we use 999999 instead of
305 5867440 for very large (both signs) dates. This allow to re-insert
306 the DateTime object into postgresql (suggested by Zahid Malik.)
308 2002-09-13 Federico Di Gregorio <fog@debian.org>
312 * Removed code to support COPY FROM/TO, will be added to new 1.1
313 branch to be released next week.
315 * cursor.c (_mogrify_seq): Fixed memory leak reported by Menno
316 Smits (values obtained by calling PySequence_GetItem are *new*
319 2002-09-07 Federico Di Gregorio <fog@debian.org>
321 * cursor.c (_psyco_curs_execute): Added skeleton to support COPY
324 2002-09-06 Federico Di Gregorio <fog@debian.org>
326 * configure.in: if libcrypt can't be found we probably are on
327 MacOS X: check for libcrypto, as suggested by Aparajita Fishman.
329 2002-09-03 Federico Di Gregorio <fog@debian.org>
331 * ZPsycopgDA/db.py (DB.columns): Applied patch from Dieter Maurer
332 to allow the DA-browser to work with mixed case table names.
334 2002-08-30 Federico Di Gregorio <fog@debian.org>
336 * ZPsycopgDA/DA.py (cast_DateTime): Applied patch from Yury to fix
337 timestamps (before they were returned with time always set to 0.)
339 2002-08-26 Federico Di Gregorio <fog@debian.org>
341 * Release 1.0.11.1 (to fix a %&£$"! bug in ZPsycopgDA not
342 accepting psycopg 1.0.11 as a valid version.
346 2002-08-22 Federico Di Gregorio <fog@debian.org>
348 * Release 1.0.11pre2.
350 * cursor.c (_psyco_curs_execute): fixed IntegrityError as reported
351 by Andy Dustman. (psyco_curs_execute): converting TypeError to
352 ProgrammingError on wrong number of % and/or aeguments.
354 * doc/examples/integrity.py: added example and check for
357 2002-08-08 Federico Di Gregorio <fog@debian.org>
359 * Release 1.0.11pre1.
361 2002-08-06 Federico Di Gregorio <fog@debian.org>
363 * ZPsycopgDA/DA.py (cast_DateTime): patched as suggested by Tom
364 Jenkins; now it shouldwork with time zones too.
366 2002-08-01 Federico Di Gregorio <fog@debian.org>
368 * ZPsycopgDA/DA.py (cast_DateTime): fixed problem with missing
369 AM/PM, as reported by Tom Jenkins.
371 2002-07-23 Federico Di Gregorio <fog@debian.org>
373 * Fixed buglets reported by Mike Coleman.
375 2002-07-22 Federico Di Gregorio <fog@debian.org>
379 2002-07-14 Federico Di Gregorio <fog@debian.org>
381 * Release 1.0.10pre2.
383 * typeobj.c (psyco_LONGINTEGER_cast): fixed bad segfault by
384 INCREFfing Py_None when it is the result of a NULL conversion.
386 2002-07-04 Federico Di Gregorio <fog@debian.org>
388 * Release 1.0.10pre1.
390 * buildtypes.py (basic_types): added TIMESTAMPTZ to the types
391 converted by the DATE builtin.
393 * ZPsycopgDA/DA.py (Connection.connect): Added version check.
395 2002-07-03 Federico Di Gregorio <fog@debian.org>
397 * typeobj.c (psyco_XXX_cast): fixed bug reported by multiple users
398 by appliying Matt patch.
400 2002-06-30 Federico Di Gregorio <fog@debian.org>
402 * ZPsycopgDA/DA.py (Connection.set_type_casts): applied patch from
403 Tom Jenkins to parse dates with TZ.
405 2002-06-20 Federico Di Gregorio <fog@debian.org>
407 * Preparing for release 1.0.9.
409 * Makefile.pre.in (dist): now we really include psycopg.spec.
411 2002-06-17 Federico Di Gregorio <fog@debian.org>
413 * ZPsycopgDA/db.py (_finish, _abort): fixed problem with
414 connection left in invalid state by applying Tom Jenkins patch.
416 2002-06-06 Federico Di Gregorio <fog@debian.org>
418 * ZPsycopgDA/db.py (DB._abort): fixed exception raising after an
419 error in execute triggerer deletion of self.db.
421 2002-05-16 Federico Di Gregorio <fog@debian.org>
423 * cursor.c (psyco_curs_fetchone): None values passed to the
424 internal typecasters.
426 * typeobj.c: added management of None to all the builtin
429 2002-04-29 Federico Di Gregorio <fog@debian.org>
431 * ZPsycopgDA/DA.py (cast_Time): applied 'seconds as a float' patch
434 2002-04-23 Federico Di Gregorio <fog@debian.org>
438 * Makefile.pre.in: we now include win32 related files in the
441 * connection.c (psyco_conn_destroy): fixed segfault reported by
442 Scott Leerssen (we were double calling _psyco_conn_close().)
444 * typemod.c (new_psyco_quotedstringobject): fixed memory stomping
445 catched by assert(); thanks to Matt Hoskins for reporting this
448 2002-04-22 Federico Di Gregorio <fog@debian.org>
450 * configure.in: grmpf. we need a VERSION file for windows, we'll
451 use it for configue and debian/rules too.
453 * Integrated win32 changes from Jason Erickson. Moved his
454 Readme.txt to README.win32, removed VERSION and DATE, patched
455 source where required. Renamed HISTORY to ChangeLog.win32, hoping
456 Jason will start adding changes to the real ChangeLog file.
458 2002-04-07 Federico Di Gregorio <fog@debian.org>
462 * configure.in: fixed little bug as reported by ron.
464 2002-04-05 Federico Di Gregorio <fog@debian.org>
468 * typemod.c (new_psyco_bufferobject): fixed encoding problem (0xff
469 now encoded as \377 and not \777.) Also encoding *all* chars as
470 quoted octal values to prevent "Invalid UNICODE character sequence
473 * Release 1.0.7. (Real this time.) (Ok, it was a joke....)
475 2002-04-03 Federico Di Gregorio <fog@debian.org>
477 * configure.in: fixed problem with postgres versions in the format
480 * connection.c (psyco_conn_destroy): moved most of the destroy
481 stuff into its own function (_psyco_conn_close) and added a call
482 to it from psyco_conn_close. This should fix the "psycopg does not
483 release postgres connections on .close()" problem.
485 2002-03-29 Federico Di Gregorio <fog@debian.org>
487 * Release 1.0.7. Delayed.
489 * buildtypes.py (basic_types): added TIMESTAMPTZ postgres type to
490 the list of valid DATETIME types (incredible luck, no changes to
491 the parse are needed!)
493 * typeobj.c (psyco_DATE_cast): fixed wrong managment of sign in
496 2002-03-27 Federico Di Gregorio <fog@debian.org>
498 * configure.in (INSTALLOPTS): added AC_PROG_CPP test, now uses
499 AC_TRY_CPP to test for _all_ required mx includes.
501 2002-03-19 Federico Di Gregorio <fog@debian.org>
503 * configure.in: added check for both pg_config.h and config.h to
504 detect postgres version.
506 * cursor.c: now None values are correctly handled when the format
507 string is not %s but %d, etc.
509 2002-03-08 Federico Di Gregorio <fog@debian.org>
511 * ZPsycopgDA/DA.py: added MessageDialog import suggested by
514 2002-03-07 Federico Di Gregorio <fog@debian.org>
516 * psycopg.spec: added RPM specs by William K. Volkman.
520 * configure.in: imported changes to allow postgres 7.2 builds from
523 2002-03-04 Federico Di Gregorio <fog@debian.org>
527 * applied table browser patch from Andy Dustman.
529 2002-02-26 Federico Di Gregorio <fog@debian.org>
531 * typeobj.c (psyco_DATE_cast): added management of infinity
532 values, this can be done in a better way, by accessing the
533 MaxDateTime and MinDateTime constants of the mx.DateTime module.
535 2002-02-20 Federico Di Gregorio <fog@debian.org>
537 * configure.in: Release 1.0.4.
539 2002-02-12 Federico Di Gregorio <fog@debian.org>
541 * ZPsycopgDA/db.py (DB.columns): fixed select to reenable column
542 expansion in table browsing.
544 * ZPsycopgDA/__init__.py: removed code that made psycopg think
547 2002-02-11 Federico Di Gregorio <fog@debian.org>
549 * cursor.c (_mogrify_dict): removed Py_DECREF of Py_None,
550 references returned by PyDict_Next() are borrowed (thanks to
551 Michael Lausch for this one.)
553 2002-02-08 Federico Di Gregorio <fog@debian.org>
555 * A little bug slipped in ZPsycopgDA, releasing 1.0.3 immediately.
559 * tests/check_types.py (TYPES): added check for hundredths of a
562 2002-02-07 Federico Di Gregorio <fog@debian.org>
564 * typeobj.c (psyco_INTERVAL_cast): patched to correct wrong
565 interpretation of hundredths of a second (patch from
566 A. R. Beresford, kudos!)
568 2002-01-31 Federico Di Gregorio <fog@debian.org>
572 2002-01-16 Federico Di Gregorio <fog@debian.org>
574 * Preparing for release 1.0.1.
576 * cursor.c (alloc_keeper): removed ALLOW_THREADS wrapper around
577 PQconnectdb: libpq calls crypt() that is *not* reentrant.
579 2001-12-19 Federico Di Gregorio <fog@debian.org>
581 * typeobj.c (psyco_DBAPITypeObject_cmp): added check to simply
582 return false when two type objects are compared (type objects are
583 meaned to be compared to integers!)
585 * typeobj.c: fixed the memory leak reported by the guys at
586 racemi, for real this time. (added about 5 DECREFS and 2 INCREFS,
589 2001-12-17 Federico Di Gregorio <fog@debian.org>
591 * typeobj.c (psyco_DBAPITypeObject_cmp): fixed memory leak by
592 using PyTuple_GET_ITEM (we are sure the tuple has at least one
593 element, we built it, after all...) (many thanks to Scott Leerssen
594 for reporting the *exact line* for this one.)
596 2001-12-13 Federico Di Gregorio <fog@debian.org>
598 * cursor.c: fixed memory leak due to extra strdup (thanks
599 to Leonardo Rochael Almeida.)
601 2001-11-14 Federico Di Gregorio <fog@debian.org>
605 * doc/README: added explanation about guide work in progess but
608 * debian/*: lots of changes to release 1.0 in debian too.
610 2001-11-12 Federico Di Gregorio <fog@debian.org>
612 * RELEASE-1.0: added release file, to celebrate 1.0.
614 * tests/zope/typecheck.zexp: regression test on types for zope.
616 2001-11-11 Federico Di Gregorio <fog@debian.org>
618 * ZPsycopgDA/DA.py (cast_Interval): removed typecast of interval
619 into zope DateTime. intervals are reported as strings when using
620 zope DateTime and as DateTimeDeltas when using mx.
622 2001-11-09 Federico Di Gregorio <fog@debian.org>
624 * typeobj.c (psyco_INTERVAL_cast): complete rewrite of the
625 interval parsing code. now we don't use sscanf anymore and all is
626 done with custom code in a very tight and fast loop.
628 2001-11-08 Federico Di Gregorio <fog@debian.org>
630 * ZPsycopgDA/DA.py (Connection.set_type_casts): added mx INTERVAL
633 * ZPsycopgDA/db.py (DB.query): now we return column names even if
634 there are no rows in the result set. also, cleaned up a little bit
637 2001-11-7 Federico Di Gregorio, <fog@debian.org>
639 * Makefile.pre.in: fixed small problem with zcat on True64
642 2001-11-06 Federico Di Gregorio <fog@debian.org>
644 * ZPsycopgDA/db.py (DB.query): added fix for concurrent update
647 2001-11-05 Federico Di Gregorio <fog@debian.org>
649 * cursor.c: now we include postgres.h if InvalidOid is still
650 undefined after all other #includes.
652 * README: clarified use of configure args related to python
655 * aclocal.m4: patched to work with symlinks installations (thanks
658 * cursor.c (_psyco_curs_execute): now reset the keeper's status to
659 the old value and not to BEGIN (solve problem with autocommit not
662 2001-11-01 Federico Di Gregorio <fog@debian.org>
664 * doc/examples/dt.py: added example on how to use the date and
667 * Makefile.pre.in (dist-zope): removed dependencies on GNU install
668 and tar commands. Also a little general cleanup on various targets.
670 * ZPsycopgDA/DA.py: fixed mx.DateTime importing.
672 2001-10-31 Federico Di Gregorio <fog@debian.org>
674 * typemod.c (psyco_xxxFromMx): fixed bug in argument parsing (we
675 weren't usigng the right type object.)
677 * aclocal.m4: now builds OPT and LDFLAGS on the values of the env
678 variables instead of overwriting them.
680 * Makefile.pre.in (CFLAGS): removed -Wall, you can add it back at
681 compile time with OPT="-Wall" ./configure ...
683 * Setup.in (OPT): removed -Wall.
685 2001-10-30 Michele Comitini <mcm@initd.net>
687 * module.h: ANSI C compatibility patch from Daniel Plagge.
689 2001-10-30 Federico Di Gregorio <fog@debian.org>
691 * README: added common building problems and solutions.
693 * configure.in: removed check for install command, already done by
694 james's aclocal.m4 for python. removed install-sh. removed -s from
697 2001-10-29 Federico Di Gregorio <fog@debian.org>
699 * Makefile.pre.in (dist): removed examples/ directory from
702 * merge with cvs head. preparing to fork again on PSYCOPG-1-0 (i
703 admit BRANCH_1_0 was quite a silly name.)
705 * doc/examples/usercast.py: now works.
707 * connection.c (curs_rollbackall): fixed little bug (exposed by
708 the deadlock below) by changing KEEPER_READY to KEEPER_READY.
710 * doc/examples/commit.py: deadlock problem solved, was the
711 example script, _not_ psycopg. pew... :)
713 * examples/*: removed the examples moved to doc/examples/.
715 * doc/examples/commit.py,dictfetch.py: moved from examples/ and
716 changed to work for 1.0. unfortunately commit.py locks psycopg!!!
718 2001-10-24 Federico Di Gregorio <fog@debian.org>
720 * modified all files neede for the 1.0 release.
722 * configure.in (MXFLAGS): removed electric fence support.
724 * Makefile.pre.in (dist): now we remove CVS working files before
727 * tests: files in this directory are not coding examples, but
728 regression tests. we need a sufficient number of tests to follow
729 every single code path in psycopg at least once. first test is
732 * doc/examples: moved new example code to examples directory, old
733 tests and code samples will stay in examples/ until the manual will
736 2001-10-16 Federico Di Gregorio <fog@debian.org>
738 * typeobj.c (psyco_INTERVAL_cast): completely revised interval
739 casting code. (psyco_TIME_cast): we use the unix epoch when the
742 * cursor.c (psyco_curs_executemany): modified sanity check to
743 accept sequences of tuples too and not just dictionaries.
745 2001-10-15 Federico Di Gregorio <fog@debian.org>
747 * typeobj.c (psyco_INTERVAL_cast): fixed bug caused by wrong
748 parsing on '1 day' (no hours, minutes and seconds.)
750 2001-10-15 Michele Comitini <mcm@initd.net>
752 * cursor.c (_execute): use the correct cast functions even on
753 retrival of binary cursors.
755 2001-10-12 Federico Di Gregorio <fog@debian.org>
757 * typemod.c (new_psyco_bufferobject): space not quoted anymore,
758 smarter formula to calculate realloc size.
760 * cursor.c (psyco_curs_fetchone): removed static tuple (using
761 static variable in multithreaded code is *crazy*, why did i do it?
764 * typeobj.c (psyco_init_types): exports the binary converter (will
765 be used in cursor.c:_execute.)
767 * typeobj.h: added export of psyco_binary_cast object.
769 2001-10-05 Federico Di Gregorio <fog@debian.org>
771 * cursor.c (_psyco_curs_execute): added missing Py_XDECREF on
774 * Makefile.pre.in (dist): added install-sh file to the
777 * replaced PyMem_DEL with PyObject_Del where necessary.
779 * connection.c (psyco_conn_destroy): added missing
780 pthread_mutex_destroy on keeper lock.
782 2001-10-01 Michele Comitini <mcm@initd.net>
784 * typemod.c(new_psyco_bufferobject()): using unsigned char for
785 binary objects to avoid too many chars escaped. A quick and
786 simple formula to avoid memory wasting and too much reallocating
787 for the converted object. Needs _testing_, but it is faster.
789 * cursor.c: #include <postgres.h>
791 * module.h: now debugging should be active only when asked by
792 ./configure --enable-devel
794 2001-09-29 Federico Di Gregorio <fog@debian.org>
796 * cursor.c (new_psyco_cursobject): added locking of connection,
797 still unsure if necessary.
799 2001-09-26 Federico Di Gregorio <fog@debian.org>
801 * configure.in: changed DEBUG into PSYCOTIC_DEBUG, to allow other
802 includes (postgres.h) to use the former. better compiler checks:
803 inline, ansi, gcc specific extensions. removed MXMODULE: we don't
806 * general #include cleanup, should compile on MacOS X too.
808 * typeobj.c (psyco_DATE_cast): uses sscanf. should be faster too.
809 (psyco_TIME_cast): dixit.
811 * applied patch from Daniel Plagge (SUN cc changes.)
813 2001-09-22 Federico Di Gregorio <fog@debian.org>
815 * ZPsycopgDA/db.py (DB._finish, DB._begin): fix for the
816 self.db == None problem.
818 2001-09-19 Michele Comitini <mcm@initd.net>
820 * typemod.c (new_psyco_bufferobject): better memory managment
821 (now it allocates only needed space dinamically).
823 * typeobj.c (psyco_BINARY_cast): ripped a useless check, now
824 it assumes that binary streams come out from the db correctly
825 escaped. Should be a lot faster.
827 2001-09-18 Federico Di Gregorio <fog@debian.org>
829 * typeobj.c (psyco_INTERVAL_cast): fixed interval conversion
830 (hours were incorrectly converted into seconds.)
832 2001-09-17 Federico Di Gregorio <fog@debian.org>
834 * cursor.c (_mogrify_seq, _mogrify_dict): added check for None
835 value and conversion of None -> NULL (fixes bug reported by Hamish
838 2001-09-12 Federico Di Gregorio <fog@debian.org>
840 * module.c: added handles to new date and time conversion
841 functions (see below.)
843 * typemod.c (psyco_XXXFromMx): added conversion functions that
844 simply wrap the mxDateTime objects instead of creating
845 them. DBAPI-2.0 extension, off-curse.
847 2001-09-10 Federico Di Gregorio <fog@debian.org>
849 * buildtypes.py: solved hidden bug by changing from dictionary to
850 list, to maintain ordering of types. sometimes (and just
851 sometimes) the type definitions were printed unsorted, resulting
852 is psycopg initializing the type system using the type objects in
853 the wrong order. you were getting float values from an int4
854 column? be happy, this is now fixed...
856 * cursor.c (psyco_curs_lastoid): added method to get oid of the
857 last inserted row (it was sooo easy, it even works...)
859 2001-09-08 Federico Di Gregorio <fog@debian.org>
861 * typeobj.c (psyco_INTERVAL_cast): added casting function for the
862 postgres INTERVAL and TINTERVAL types (create a DateTimeDelta
865 2001-09-05 Federico Di Gregorio <fog@debian.org>
867 * cursor.c: moved all calls to begin_pgconn to a single call in
868 _psyco_curs_execute, to leave the connection in a not-idle status
869 after a commit or a rollback. this should free a lot of resources
870 on the backend side. kudos to the webware-discuss mailing list
871 members and to Clark C. Evans who suggested a nice solution.
873 * connection.c (curs_rollbackall, curs_commitall): removed calls
874 to begin_pgconn, see above.
876 * module.c (initpsycopg): cleaned up mxDateTime importing; we now
877 use the right function from mxDateTime.h. Is not necessary anymore
878 to include our own mx headers. This makes psycopg to depend on
881 2001-09-04 Federico Di Gregorio <fog@debian.org>
883 * doc/*.tex: added documentation directory and skeleton of the
886 2001-09-03 Federico Di Gregorio <fog@debian.org>
888 * merged in changes from HEAD (mostly mcm fixes to binary
891 * preparing for release 0.99.6.
893 2001-09-03 Michele Comitini <mcm@initd.net>
895 * typemod.c: much faster Binary encoding routine.
897 * typeobj.c: much faster Binary decoding routine.
899 2001-08-28 Michele Comitini <mcm@initd.net>
901 * typemod.c: Working binary object to feed data to bytea type
904 * typeobj.c: Added BINARY typecast to extract data from
907 * cursor.c: Added handling for SQL binary cursors.
909 2001-08-3 Michele Comitini <mcm@initd.net>
911 * cursor.c: fixed DATESTYLE problem thanx to Steve Drees.
913 2001-07-26 Federico Di Gregorio <fog@debian.org>
915 * Makefile.pre.in: applied change suggested by Stefan H. Holek to
916 clobber and distclean targets.
918 2001-07-23 Federico Di Gregorio <fog@debian.org>
920 * ZPsycopgDA/db.py: fixed little bugs exposed by multiple select
921 changes, not we correctly import ListType and we don't override
922 the type() function with a variable.
924 2001-07-17 Federico Di Gregorio <fog@debian.org>
926 * configure.in: Release 0.99.5.
928 2001-07-12 Federico Di Gregorio <fog@debian.org>
930 * debian/* fixed some little packaging problems.
932 2001-07-11 Federico Di Gregorio <fog@debian.org>
934 * cursor.c, typeobj.c: removed some Py_INCREF on PyDict_SetItem
935 keys and values to avoid memory leaks.
937 2001-07-03 Federico Di Gregorio <fog@debian.org>
939 * cursor.c (_mogrify_dict): added dictionary mogrification: all
940 Strings in the dictionary are translated into QuotedStrings. it
941 even works... (_mogrify_seq): added sequence mogrification and
942 code to automagically mogrify all strings passed to .execute().
944 2001-07-02 Federico Di Gregorio <fog@debian.org>
948 * typemod.c: added QuotedString class and methods.
950 * module.c: added QuotedString method to module psycopg.
952 * typemod.c: changed Binary objects into something usefull. now
953 the buffer object quotes the input by translatin every char into
954 its octal representation. this consumes 4x memory but guarantees
955 that even binary data containing '\0' can go into the Binary
958 * typemod.h: added definition of QuotedString object.
960 2001-06-28 Federico Di Gregorio <fog@debian.org>
962 * ZPsycopgDA/db.py, ZPsycopgDA/DABase.py: applied patch sent by
963 yury to fix little buglet.
965 2001-06-22 Federico Di Gregorio <fog@debian.org>
969 * connection.c (new_psyco_connobject): now we strdup dsn, as a fix
970 for the problem reported by Jack Moffitt.
972 * Ok, this will be the stable branch from now on...
974 * Merged in stuff from 0.99.3. About to re-branch with a better
977 2001-06-20 Federico Di Gregorio <fog@debian.org>
979 * Release 0.99.3. Showstoppers for 1.0 are:
981 - mxDateTime module loading
982 - bug reported by Yury.
984 * Integrated patches from Michele:
985 - searching for libcrypt in configure now works
986 - removed memory leak in asprintf.c
988 2001-06-15 Federico Di Gregorio <fog@debian.org>
990 * ZPsycopgDA/__init__.py (initialize): applied patch from Jelle to
991 resolve problem with Zope 2.4.0a1.
993 2001-06-14 Federico Di Gregorio <fog@debian.org>
995 * configure.in: added code to check for missing functions (only
998 * asprintf.c: added compatibility code for oses that does not have
999 the asprintf() function.
1001 2001-06-10 Federico Di Gregorio <fog@debian.org>
1003 * Branched PSYCOPG_0_99_3. Development will continue on the cvs
1004 HEAD, final adjustements and bugfixing should go to this newly
1007 2001-06-08 Michele Comitini <mcm@initd.net>
1009 * ZPsycopgDA/DA.py: DateTime casts simplified and corrected
1010 as suggested by Yury.
1012 2001-06-05 Federico Di Gregorio <fog@debian.org>
1016 * Makefile.pre.in (dist): added typemod.h and typemod.c to
1019 * cursor.c (commit_pgconn, abort_pgconn, begin_pgconn): resolved
1020 segfault reported by Andre by changing PyErr_SetString invokations
1021 into pgconn_set_critical. the problem was that the python
1022 interpreter simply segfaults when we touch its internal data (like
1023 exception message) inside an ALLOW_THREADS wrapper.
1025 * now that we are 100% DBAPI-2.0 compliant is time for the
1026 one-dot-o release (at last!) Para-pa-pa! This one is tagged
1027 PSYCOPG_0_99_1 but you can call it 1.0pre1, if you better like.
1028 (A very long text just to say 'Release 0.99.1')
1030 * typemod.[ch]: to reach complete DBAPI-2.0 compliance we
1031 introduce some new objects returned by the constructors Date(),
1032 Time(), Binary(), etc. Those objects are module-to-database only,
1033 the type system still takes care of the database-to-python
1036 2001-06-01 Federico Di Gregorio <fog@debian.org>
1040 * module.h: better error message when trying to commit on a
1041 cursor derived from serialized connection.
1043 * ZPsycopgDA/db.py (DB.close): now self.cursor is set to None when
1044 the connection is closed.
1046 * module.c (initpsycopg): added missing (sic) DBAPI module
1047 parameters (paramstyle, apilevel, threadsafety, etc...)
1049 2001-05-24 Michele Comitini <mcm@initd.net>
1051 * ZPsycopgDA: Support for Zope's internal DateTime, option
1052 to leave mxDateTime is available on the management interface so
1053 to switch with little effort :).
1055 * cursor.c: more aggressive cleanup of postgres results
1056 to avoid the risk of memory leaking.
1058 * typeobj.c, connection.c: deleted some Py_INCREF which
1061 2001-05-18 Federico Di Gregorio <fog@debian.org>
1065 2001-05-17 Michele Comitini <mcm@initd.net>
1067 * ZPsycopgDA/db.py: The connection closed by the management
1068 interface of zope now raises error instead of reopening itself.
1070 * cursor.c (psyco_curs_close): does not try to free the cursor
1071 list, as it caused a segfault on subsequent operations on the same
1074 2001-05-07 Federico Di Gregorio <fog@debian.org>
1078 * Merged in changes from me and mcm.
1080 2001-05-06 Michele Comitini <mcm@initd.net>
1082 * ZPsycopgDA/db.py (DB.close): Fixes a bug report by Andre
1083 Shubert, which was still open since there was a tiny typo in
1086 * ZPsycopgDA/DA.py (Connection.sql_quote__): overriding standard
1087 sql_quote__ method to provide correct quoting (thank to Philip
1088 Mayers and Casey Duncan for this bug report).
1090 2001-05-04 Federico Di Gregorio <fog@debian.org>
1092 * ZPsycopgDA/db.py: added .close() method (as suffested by Andre
1095 2001-05-04 Michele Comitini <mcm@initd.net>
1097 * module.h: working on a closed object now raises an
1100 * ZPsycopgDA/db.py: fixed problems with dead connections detection.
1102 * ZPsycopgDA/__init__.py: corrected SOFTWARE_HOME bug for zope
1105 2001-05-04 Federico Di Gregorio <fog@debian.org>
1107 * examples/thread_test.py: now that the serialization bug is
1108 fixed, it is clear that thread_test.py is bugged! added a commit()
1109 after the creation of the first table to avoid loosing it on the
1110 exception raised by the CREATE of an existing table_b.
1112 2001-05-03 Federico Di Gregorio <fog@debian.org>
1114 * connection.c (psyco_conn_cursor): reverted to old locking
1115 policy, the new caused a nasty deadlock. apparently the multiple
1116 connection problem has been solved as a side-effect of the other
1119 * module.h: removes stdkeeper field from connobject, we don't need
1122 * cursor.c (dispose_pgconn): now sets self->keeper to NULL to
1123 avoid decrementing the keeper refcnt two times when the cursor is
1124 first closed and then destroyed.
1126 * connection.c (psyco_conn_cursor): fixed little bug in cursor
1127 creation: now the connection is locked for the entire duration of
1128 the cursor creation, to avoid a new cursor to be created with a
1129 new keeper due to a delay in assigning the stdmanager cursor.
1131 * cursor.c: added calls to pgconn_set_critical() and to
1132 EXC_IFCRITICAL() where we expect problems. Still segfaults but at
1133 least raise an exception...
1135 * cursor.c (psyco_curs_autocommit): added exception if the
1136 cursor's keeper is shared between more than 1 cursor.
1138 * module.h (EXC_IFCRITICAL): added this macro that call
1139 pgconn_resolve_critical) on critical errors.
1141 * cursor.c (alloc_keeper): added check for pgres == NULL.
1143 * cursor.c (psyco_curs_destroy): merged psyco_curs_destroy() and
1144 psyco_curs_close(): now both call _psyco_curs_close() and destroy
1145 does only some extra cleanup.
1147 2001-05-03 Michele Comitini <mcm@initd.net>
1149 * ZPsycopgDA/db.py: Some cleanup to bring the zope product up to
1150 date with the python module. Some bugs found thanks to Andre
1151 Schubert. Now the ZDA should rely on the new serialized version
1154 * cursor.c: while looking for problems in the ZDA some come out
1155 here, with the inability to handle dropping connection correctly.
1156 This leads to segfaults and is not fixed yet for lack of time.
1157 Some problems found in cursors not willing to share the same
1158 connection even if they should. Hopefully it should be fixed
1161 2001-04-26 Federico Di Gregorio <fog@debian.org>
1163 * fixed bug reported by Andre Schubert by adding a new cast
1164 function for long integers (int8 postgresql type.) at now they are
1165 converted to python LongIntegers: not sure f simply convert to
1168 * michele applied patch from Ivo van der Wijk to make zpsycopgda
1169 behave better when INSTANCE_HOME != SOFTWARE_HOME.
1171 * cursor.c (_psyco_curs_execute): also fill the 'columns' field.
1173 * module.h: added a 'columns' field to cursobject, to better
1174 support the new dictionary fetch functions (dictfetchone(),
1175 dictfetchmany(), dictfetchall().)
1177 * cursor.c: added the afore-mentioned functions (function names
1178 are not definitive, they will follow decisions on the DBAPI SIG.)
1180 2001-04-03 Federico Di Gregorio <fog@debian.org>
1184 * mcm fixed a nasty bug by correcting a typo in module.h.
1186 2001-03-30 Federico Di Gregorio <fog@debian.org>
1188 * module.c (psyco_connect): added `serialized' named argument to
1189 the .connect() method (takes 1 or 0 and initialize the connection
1190 to the right serialization state.)
1192 * Makefile.pre.in (dist): fixed little bug, a missing -f argument
1195 * examples/thread_test.py: removed all extension cruft.
1197 * examples/thread_test_x.py: this one uses extensions like the
1198 per-cursor commit, autocommit, etc.
1200 * README (psycopg): added explanation on how .serialize() works.
1202 * connection.c (psyco_conn_serialize): added cursor serialization
1203 and .serialize() method on the connection object. now we are
1204 definitely DBAPI-2.0 compliant.
1206 2001-03-20 Federico Di Gregorio <fog@debian.org>
1208 * cursor.c (_psyco_curs_execute): replaced some fields in
1209 description with None, as suggested on the DB-SIG ML.
1211 * something like one hundred of little changes to allow cursors
1212 share the same postgres connection. added connkeeper object and
1213 pthread mutexes (both in connobject and connkeeper.) apparently it
1214 works. this one will be 0.5.0, i think.
1216 2001-03-19 Michele Comitini <mcm@initd.net>
1218 * cursor.c: added mutexes, they do not interact well with python
1221 2001-03-16 Michele Comitini <mcm@initd.net>
1223 * ZPsycopgDA/db.py (ZDA): some fixes in table browsing.
1225 2001-03-16 Federico Di Gregorio <fog@debian.org>
1227 * suite/tables.postgresql (TABLE_DESCRIPTIONS): fixed some typos
1228 introduced by copying by hand the type values from pg_type.h.
1230 * suite/*: added some (badly) structured code to test for
1231 DBAPI-2.0 compliance.
1233 * cursor.c (pgconn_notice_callback): now the NOTICE processor only
1234 prints NOTICEs when psycopg has been compiled with the
1235 --enable-devel switch.
1237 * connection.c: removed 'autocommit' attribute, now is a method as
1238 specified in the DBAPI-2.0 document.
1240 2001-03-15 Federico Di Gregorio <fog@debian.org>
1242 * connection.c (curs_commitall): splitted for cycle in two to
1243 avoid the "bad snapshot" problem.
1245 2001-03-14 Federico Di Gregorio <fog@debian.org>
1249 * cursor.c (_psyco_curs_execute): fixed nasty bug, there was an
1250 free(query) left from before the execute/callproc split.
1252 * Preparing for 0.4.6.
1254 2001-03-13 Federico Di Gregorio <fog@debian.org>
1256 * cursor.c (psyco_curs_execute): fixed some memory leaks in
1257 argument parsing (the query string was not free()ed.)
1258 (psyco_curs_callproc): implemented callproc() method on cursors.
1259 (_psyco_curs_execute): this is the function that does the real
1260 stuff for callproc() and execute().
1261 (pgconn_notice_*): added translation of notices into python
1262 exceptions (do we really want that?)
1264 * configure.in: removed some cruft (old comments and strncasecmp()
1267 2001-03-12 Federico Di Gregorio <fog@debian.org>
1269 * examples/thread_test.py: added moronic argument parsing: now you
1270 can give the dsn string on the command line... :(
1274 2001-03-10 Federico Di Gregorio <fog@debian.org>
1276 * cursor.c (request_pgconn): added code to set datestyle to ISO on
1277 new connections (many thanks to Yury <yura@vpcit.ru> for the code,
1278 i changed it just a little bit to raise an exception on error.)
1280 2001-03-09 Federico Di Gregorio <fog@debian.org>
1284 * ZPsycopgDA/db.py: michele fixed a nasty bug here.
1286 2001-03-08 Federico Di Gregorio <fog@debian.org>
1290 2001-03-07 Federico Di Gregorio <fog@debian.org>
1292 * Makefile.pre.in (dist): typeobj_builtins.c included for people
1293 without pg_type.h. if you encounter type-casting problems like
1294 results cast to the wrong type, simply "rm typeobj_builtins.c" and
1297 * typeobj.c (psyco_*_cast): removed RETURNIFNULL() macro from all
1298 the builtin casting functions. (psyco_STRING_cast) does not create
1299 a new string anymore, simply Py_INCREF its argument and return it.
1301 * cursor.c (psyco_curs_fetchone): removed strdup() call. added
1302 PQgetisnull() test to differentiate between real NULLs and empty
1305 * Removed cursor.py (mcm, put tests in examples) and fixed some
1306 typos in the dtml code.
1308 2001-03-04 Michele Comitini <mcm@initd.net>
1310 * examples/commit_test.py: Modifications to test argument passing
1311 and string substitution to cursor functions, nothing more.
1313 * ZPsycopgDA/db.py: now it exploits some of the good features of
1314 the psycopg driver, such as connection reusage and type
1315 comparison. Code is smaller although it handles (and
1316 reports) errors much better.
1318 * cursor.c: corrected a bug that left a closed cursor in the
1319 cursor list of the connection. Now cursors are removed from the
1320 lists either when they are close or when they are destroyed.
1321 Better connection (TCP) error reporting and handling.
1324 2001-03-02 Federico Di Gregorio <fog@debian.org>
1326 * examples commit_test.py: added code to test autocommit.
1328 * examples/thread_test.py (ab_select): modified select thread to
1329 test autocommit mode.
1333 * module.h, connection.c, cursor.c: added autocommit support.
1335 2001-02-28 Federico Di Gregorio <fog@debian.org>
1339 2001-02-27 Michele Comitini <mcm@initd.net>
1341 * cursor.py: cut some unuseful code in psyco_curs_fetchmany() and
1342 psyco_curs_fetchall() inserted an assert in case someting goes
1345 2001-02-27 Federico Di Gregorio <fog@debian.org>
1347 * debian/*: various changes to build both the python module and
1348 the zope db adapter in different packages (respectively
1349 python-psycopg and zope-psycopgda.)
1351 * examples/type_test.py: better and more modular tests.
1353 * typeobj.c: added DATE, TIME, DATETIME, BOOLEAN, BINARY and ROWID
1354 types. (RETURNIFNULL) added NULL-test to builtin conversion
1355 functions (using the RETURNIFNULL macro.)
1357 2001-02-26 Federico Di Gregorio <fog@debian.org>
1359 * releasing 0.3 (added NEWS file.)
1361 2001-02-26 Michele Comitini <mcm@initd.net>
1363 * cursor.c: fetchmany() some cleanup done.
1365 * ZPsycopgDA/db.py, ZPsycopgDA/__init__.py, : fixes to make the
1366 ZDA work some way. WARNING WARNING WARNING the zda is still
1367 alpha code, but we need some feed back on it so please give it
1370 2001-02-26 Federico Di Gregorio <fog@debian.org>
1372 * typeobj.c (psyco_STRING_cast): fixed bad bad bad bug. we
1373 returned the string without coping it and the type-system was more
1374 than happy to Py_DECREF() it and trash the whole system. fixed at
1377 * module.h (Dprintf): added pid to every Dprintf() call, to
1378 facilitate multi-threaded debug.
1380 2001-02-26 Michele Comitini <mcm@initd.net>
1382 * module.c: added code so that DateTime package need not to be
1383 loaded to have mxDateTime. This should avoid clashing with
1384 DateTime from the zope distribution.
1386 * cursor.c: setting error message in fetchmany when no more tuples
1387 are left. This has to be fixed in fetch and fetchall to.
1389 2001-02-26 Federico Di Gregorio <fog@debian.org>
1391 * configure.in: stepped up version to 0.3, ready to release
1392 tomorrow morning. added check for path to DateTime module.
1394 * examples/usercast_test.py: generate some random boxes and
1395 points, select the boxes with at least one point inside and print
1396 them converting the PostgeSQL output using a user-specified cast
1399 2001-02-24 Federico Di Gregorio <fog@debian.org>
1401 * cursor.c (psyco_curs_fetchone): now an error in the python
1402 callback when typecasting results raise the correct exception.
1404 * typeobj.c (psyco_DBAPITypeObject_call): removed extra Py_INCREF().
1406 2001-02-23 Federico Di Gregorio <fog@debian.org>
1408 * replaced every single instance of the string 'pgpy' with 'psyco'
1409 (this was part of the general cleanup.)
1411 * type_test.py: added this little test program to the distribution
1412 (use the new_type() method to create new instances of the type
1415 * typeobj.c: general cleanup. fixed some bugs related to
1416 refcounting (again!)
1418 * cursor.c: general cleanup. (request_pgconn) simplified by adding
1419 a support function (_extract_pgconn.)
1421 * connection.c: general cleanup. replaced some ifs with asserts()
1422 in utility functions when errors depend on programming errors and
1423 not on runtime exceptions. (pgpy_conn_destroy) fixed little bug
1424 when deleting available connections from the list.
1426 * module.h: general cleanup.
1428 * typeobj.h: general cleanup, better comments, made some function
1429 declarations extern.
1431 * module.c: general cleanup, double-checked every function for
1432 memory leaks. (pgpy_connect) removed unused variable 'connection'.
1434 2001-02-22 Federico Di Gregorio <fog@debian.org>
1436 * typeobj.c: fixed lots of bugs, added NUMBER type object. now the
1437 basic tests in type_test.py work pretty well.
1439 * cursor.c (pgpy_curs_fetchmany): fixed little bug, fetchmany()
1440 reported one less row than available.
1442 * fixed lots of bugs in typeobj.c, typeobj.h, cursor.c. apparently
1443 now the type system works. it is time to clean up things a little
1446 2001-02-21 Federico Di Gregorio <fog@debian.org>
1448 * typeobj.c: separated type objects stuff from module.c
1450 * typeobj.h: separated type objects stuff from module.h
1452 2001-02-19 Federico Di Gregorio <fog@debian.org>
1454 * cursor.c (pgpy_curs_fetchmany): now check size and adjust it to
1455 be lesser or equal than the nuber of available rows.
1457 2001-02-18 Michele Comitini <mcm@initd.net>
1459 * module.c, module.h: added optional args maxconn and minconn to
1460 connection functions
1462 * cursor.c: better error checking in request_pgconn.
1464 * connection.c: changed new_connect_obj to take as optional args
1465 maxconn and minconn. Added the corresponding ro attributes to
1468 * cursor.py: added some code to stress test cursor reusage.
1470 * cursor.c: some fixes on closed cursors.
1472 * connection.c: corrections on some assert calls.
1474 2001-02-16 Federico Di Gregorio <fog@debian.org>
1476 * configure.in: added --enable-priofile sqitch. changed VERSION to
1477 0.2: preparing for a new release.
1479 * cursor.c: added a couple of asserts.
1481 2001-02-16 Michele Comitini <mcm@initd.net>
1483 * cursor.c, connection.c: fixed the assert problem: assert must
1484 take just the value to be tested! no assignemente must be done in
1485 the argument of assert() otherwise is wiped when NDEBUG is set.
1487 * module.h: some syntax error fixed. Error in allocating a tuple
1488 corrected in macro DBAPITypeObject_NEW().
1490 * module.c: pgpy_DBAPITypeObject_init() is not declared static anymore.
1492 * cursor.c: executemany() now does not create and destroy tuples
1493 for each list item, so it is much faster.
1495 2001-02-14 Michele Comitini <mcm@initd.net>
1497 * cursor.c: added again Py_DECREF on the cpcon after disposing
1498 it. assert() with -DNDEBUG makes the driver segfault while it
1502 2001-02-13 Federico Di Gregorio <fog@debian.org>
1504 * some of the memory leak were memprof errors, bleah. resumed some
1505 old code, fixed segfault, fixed other bugs, improved speed. almost
1506 ready for a new release.
1508 * connection.c (pgpy_conn_destroy): replaced some impossible ifs
1511 * cursor.c (pgpy_curs_close): added Py_DECREF() to
1512 self->descritpion to prevent a memory leak after an execute().
1514 * connection.c (pgpy_conn_destroy): always access first element of
1515 lists inside for cycles because removing items from the list makes
1516 higher indices invalid.
1518 * cursor.c (dispose_pgconn): fixed memory leak, there was a
1519 missing Py_DECREF() after the addition of the C object wrapping
1520 the postgresql connection to the list of available connections.
1522 * cursor.c (dispose_pgconn): fixed another memory leak: an
1523 orphaned cursor should call PQfinish() on its postgresql
1524 connection because it has no python connection to give the
1525 postgresql ine back.
1527 * cursor.c (pgpy_curs_execute): added Py_DECREF() of description
1528 tuple after adding it to self->description. this one fixes the
1529 execute() memory leak.
1531 * cursor.c (pgpy_curs_fetchall): added missing Py_DECREF() on row
1532 data (obtained from fetchone().) this fixes the last memory leak.
1533 (thread_test.py now runs without leaking memory!)
1535 2001-02-12 Federico Di Gregorio <fog@debian.org>
1537 * INSTALL: removed wok cruft from head of this file.
1539 * debian/rules: debianized the sources. python-psycopg is about to
1540 enter debian. mxDateTime header locally included until the
1541 maintainer of python-mxdatetime includes them in his package
1542 (where they do belong.)
1544 * autogen.sh: added option --dont-run-configure.
1546 2001-02-09 Federico Di Gregorio <fog@debian.org>
1548 * module.c (initpsycopg): changed name of init function to match
1549 new module name (also changed all the exception definitions.)
1551 * README: updated psycopg description (we have a new name!)
1553 * Ready for 0.1 release.
1555 2001-02-07 Michele Comitini <mcm@initd.net>
1557 * cursor.c: now executemany takes sequences and not just
1560 2001-02-07 Federico Di Gregorio <fog@debian.org>
1562 * Makefile.pre.in: now dist target includes test programs
1563 (thread_test.py) and README and INSTALL files.
1565 * configure.in: changed --with-devel to --enable-devel. little
1566 cosmetical fixes to the option management.
1568 * connection.c, module.c, cursor.c, module.h: removed 'postgres/'
1569 from #include directive. it is ./configure task to find the right
1572 * thread_test.py: added thread testing program.
1574 2001-02-07 Michele Comitini <mcm@initd.net>
1576 * cursor.c: added code to allow threads during PQexec() calls.
1578 * cursor.c: added begin_pgconn to rollback() and commit()
1579 so that the cursror is not in autocommit mode.
1581 * cursor.c: added rollback() and commit() methods to cursor
1585 2001-02-07 Federico Di Gregorio <fog@debian.org>
1587 * connection.c (pgpy_conn_destroy): always delete item at index
1588 0 and not i (because items shift in the list while deleting and
1589 accessing items at len(list)/2 segfaults.)
1591 2001-02-07 Michele Comitini <mcm@initd.net>
1593 * connection.c: added some more checking to avoid
1594 clearing of already cleared pgresults. Calling curs_closall()
1595 in conn_destroy() since cursors have to live even without
1596 their parent connection, otherwise explicit deletion of
1597 object referencing to those cursors can cause arbitrary code
1600 * cursor.c: some more checking to avoid trying to close
1601 already close pgconnections.
1603 2001-02-06 Federico Di Gregorio <fog@debian.org>
1605 * Makefile.pre.in (CFLAGS): added -Wall to catch bad programming
1608 * cursor.c, connection.c: lots of fixes to the destroy stuff. now
1609 all the cursor are destroyed *before* the connection goes away.
1611 * cursor.c (request_pgconn): another idiot error done by not
1612 replacing dsn with owner_conn->dsn. fixed.
1613 (dispose_pgconn): commented if to guarantee that the connection is
1614 returned to the pool of available connections.
1616 * merged changes done by mcm.
1618 * cursor.c: general cleanup and better debugging/error
1619 messages. changed xxx_conn into xxx_pgconn where still
1620 missing. some pretty big changes to the way pgconn_request()
1621 allocates new connections.
1623 * connection.c: removed all 'register' integers. obsolete, gcc
1624 does a much better job optimizing cycles than a programmer
1625 specifying how to use registers.
1627 * module.h: some general cleanup and better definition of DPrintf
1628 macro. now the DEBUG variable can be specified at configure time by
1629 the --with-devel switch to ./configure.
1631 2001-02-02 Michele Comitini <mcm@initd.net>
1633 * cursor.c (Repository): Added functions for managing a connection
1636 * configure.in (Repository): removed check for mxdatetime headers.
1638 2001-01-24 Federico Di Gregorio <fog@debian.org>
1640 * first checkout from shinning new init.d cvs.
1642 * autotoolized build system. note that the mx headers are missing
1643 from the cvs, you should get them someplace else (this is the
1644 right way to do it, just require the headers in the configure
1647 2001-01-21 Michele Comitini <mcm@initd.net>
1649 * cursor.c (Repository): commit, abort, begin functions now check
1650 the right exit status of the command.
1652 * connection.c (Repository): working commit() and rollback()
1655 2001-01-20 Michele Comitini <mcm@initd.net>
1657 * module.h (Repository): added member to cursor struct to handle
1658 queries without output tuples.
1660 * cursor.c (Repository): new working methods: executemany,
1661 fetchone, fetchmany, fetchall.
1663 2001-01-18 Michele Comitini <mcm@initd.net>
1665 * cursor.c (Repository): close working. destroy calling close.
1666 close frees pg structures correctly.
1668 * connection.c (Repository): close method working. destroy seems
1671 2001-01-17 Michele Comitini <mcm@initd.net>
1673 * cursor.c (Repository): now each python cursor has its own
1674 connection. Each cursor works in a transaction block.
1676 * connection.c (Repository): added cursor list to connection
1679 2001-01-14 Michele Comitini <mcm@initd.net>
1681 * cursor.c (Repository): Beginning of code to implement cursor
1682 functionalities as specified in DBA API 2.0, through the use of
1683 transactions not cursors.
1685 * connection.c (Repository): Added some error checking code for pg
1686 connection (will be moved to cursor?).
1688 2001-01-13 Michele Comitini <mcm@initd.net>
1690 * connection.c (Repository): Added error checking in connection
1691 code to fail if connection to the db could not be opened.
1693 * module.h (Repository): New macro to help creating
1696 * module.c (Repository): DBAPITypeObject __cmp__ function is now
1697 very simplified using recursion.
1699 * module.h (Repository): "DBAPIObject" changed to
1702 * module.c (Repository): Fixes for coerce function of DBAPIObjects
1703 by Federico Di Gregorio <fog@initd.net>.
1704 (Repository): Clean up and better naming for DBAPITypeObjects.
1706 2001-01-08 Michele Comitini <mcm@initd.net>
1708 * module.c (Repository): Corrected the exception hierarcy
1710 * connection.c (Repository): Begun to use the connection objects
1713 2001-01-07 Michele Comitini <mcm@initd.net>
1715 * module.c (Repository): Added the Date/Time functions.
1717 2001-01-06 Michele Comitini <mcm@initd.net>
1719 * cursor.c (Repository): Skeleton of cursor interface. All
1720 methods and attributes of cursor objects are now available
1721 in python. They do nothing now.
1723 2001-01-05 Michele Comitini <mcm@initd.net>
1725 * module.c (Repository): Test version; module loaded with
1728 2001-01-05 Michele Comitini <mcm@initd.net>
1730 * Setup.in (Repository): Setup file.
1732 * Makefile.pre.in (Repository): from the python source.
1734 2001-01-05 Michele Comitini <mcm@initd.net>
1736 * module.c: Written some code for defining exceptions.
1738 * module.h: Static variable for exceptions.
1740 2001-01-04 Michele Comitini <mcm@initd.net>
1742 * Changelog: pre-release just a few prototypes to get started.