This commit was manufactured by cvs2svn to create branch
[plcapi.git] / psycopg2 / doc / ChangeLog-1.x
1 2003-07-26  Federico Di Gregorio  <fog@debian.org>
2
3         * Release 1.1.7.
4
5         * ZPsycopgDA/db.py: added _cursor method that checks for self.db
6         before returning a new cursor. Should fix problem reported with
7         Zope 2.7.  
8
9 2003-07-23  Federico Di Gregorio  <fog@debian.org>
10
11         * cursor.c: applied notify and fileno patch from Vsevolod Lobko.
12
13 2003-07-20  Federico Di Gregorio  <fog@debian.org>
14
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.
18
19 2003-07-13  Federico Di Gregorio  <fog@debian.org>
20
21         * Release 1.1.6.
22
23         * cursor.c (psyco_curs_scroll): added scroll method, patch from
24         Jason D.Hildebrand.
25
26         * typemod.c (new_psyco_quotedstringobject): discard NUL characters
27         (\0) in quoted strings (fix problem reported by Richard Taylor.)
28
29 2003-07-10  Federico Di Gregorio  <fog@debian.org>
30
31         * Added python-taylor.txt in doc directory: very nice introduction
32         to DBAPI programming by Richard Taylor.
33
34 2003-07-09  Federico Di Gregorio  <fog@debian.org>
35
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.)
39
40 2003-06-23  Federico Di Gregorio  <fog@debian.org>
41
42         * Release 1.1.5.1.
43
44         * ZPsycopgDA/db.py (DB.query): stupid error making ZPsycopgDA
45         unusable fixed (else->except).
46
47 2003-06-22  Federico Di Gregorio  <fog@debian.org>
48
49         * Release 1.1.5 candidate.
50
51         * cursor.c (psyco_curs_copy_to): now any object with the write
52         method can be used as a copy_to target.  
53
54 2003-06-20  Federico Di Gregorio  <fog@debian.org>
55
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. 
60
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).
66
67         * finally updated check_types.expected. checked by hand the
68         conversions work the right way.
69
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.
73
74 2003-06-19  Federico Di Gregorio  <fog@debian.org>
75
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.)
80
81 2003-05-07  Federico Di Gregorio  <fog@debian.org>
82
83         * Release 1.1.4.
84
85         * cursor.c: Added "statusmessage" attribute that holds the backend
86         message (modified lots of functions, look for self->status).
87
88 2003-05-06  Federico Di Gregorio  <fog@debian.org>
89
90         * typemod.c (new_psyco_datetimeobject): moved Py_INCREF into
91         XXX_FromMx functions, to fix memory leak reported by Jim Crumpler.
92
93 2003-04-11  Federico Di Gregorio  <fog@debian.org>
94
95         * module.h (PyObject_TypeCheck): fixed leak in python 2.1
96         (Guido van Rossum).
97
98 2003-04-08  Federico Di Gregorio  <fog@debian.org>
99
100         * buildtypes.py (basic_types): removed LXTEXT (never user, does
101         not exists anymore.)
102
103 2003-04-07  Federico Di Gregorio  <fog@debian.org>
104
105         * setup.py: added very lame setup.py script.
106
107 2003-04-02  Federico Di Gregorio  <fog@debian.org>
108
109         * Release 1.3. 
110
111         * psycopg.spec: Added (but modified) spec file by William
112         K. Volkman (again, this change was lost somewhere in time...)
113
114 2003-04-01  Federico Di Gregorio  <fog@debian.org>
115
116         * cursor.c (_psyco_curs_execute): psycopg was reporting everything
117         as IntegrityError; reported and fix suggested by Amin Abdulghani.
118
119 2003-03-21  Federico Di Gregorio  <fog@debian.org>
120
121         * cursor.c (psyco_curs_fetchone): debug statements sometimes made
122         psycopg segfault: fixed by a patch by Ken Simpson.
123
124 2003-03-18  Federico Di Gregorio  <fog@debian.org>
125
126         * cursor.c (alloc_keeper): patch from Dieter Maurer to unlock GIL
127         whaile calling PQconnectdb().
128
129 2003-03-05  Federico Di Gregorio  <fog@debian.org>
130
131         * Release 1.1.2.
132
133         * Applied cygwin patch from Hajime Nakagami.
134
135 2003-02-25  Federico Di Gregorio  <fog@debian.org>
136
137         * Release 1.1.2pre1.
138         
139         * cursor.c: added .lastrowid attribute to cursors (lastoid is
140         deprecated and will be removed sometime in the future.)
141
142         * cursor.c (begin_pgconn): implemented various isolation levels
143         (also, in abort_pgconn, commit_pgconn.)
144
145         * Added keyword parameters to psycopg.connect(): all take strings
146         (even port): database, host, port, user, password.
147         
148         * configure.in: fixed test for postgres version > 7.2.
149
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.
153
154 2003-02-24  Federico Di Gregorio  <fog@debian.org>
155
156         * Merged in changes from 1.0.15.1 (see below for merged
157         ChangeLog.)
158
159 2003-02-14  Federico Di Gregorio  <fog@debian.org>
160
161         * Release 1.0.15.1.
162
163         * cursor.c (_mogrify_fmt): in some cases we where removing one
164         character too much from the format string, resulting in BIG BAD
165         BUG. <g> Fixed.
166
167 2003-02-13  Federico Di Gregorio  <fog@debian.org>
168
169         * Release 1.0.15. <g>
170         
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.)
174
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
180             method does nothing.
181
182 2003-02-12  Federico Di Gregorio  <fog@debian.org>
183
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?)
187
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.)
191
192 2003-02-05  Federico Di Gregorio  <fog@debian.org>
193
194         * typeobj.c (psyco_INTERVAL_cast): patched again to take into
195         account leading zeroes.
196
197 2003-02-02  Federico Di Gregorio  <fog@debian.org>
198
199         * Makefile.pre.in: applied patch from Albert Chin-A-Young to
200         define BLDSHARED.
201
202         * README: added explicit permission to link with OpenSSL.
203
204 2003-01-30  Federico Di Gregorio  <fog@debian.org>
205
206         * config.h.in: applied patch from Albert Chin-A-Young to fix
207         asprintf prototype.
208
209 2003-01-29  Federico Di Gregorio  <fog@debian.org>
210
211         * cursor.c (_mogrify_seq): fixed little refcount leak, as
212         suggested by Yves Bastide.
213
214 2003-01-24  Federico Di Gregorio  <fog@debian.org>
215
216         * Merged-in changes from 1.0.14.2 (emacs diff mode is great..)
217
218         * Release 1.0.14.2.
219
220         * ZPsycopgDA/db.py (DB.query): back to allowing up to 1000 db
221         errors before trying to reopen the connection by ourselves.
222         
223         * ZPsycopgDA/db.py: a false (None preferred, 0 allowed) max_rows
224         value now means "fetch all results".
225
226 2003-01-22  Federico Di Gregorio  <fog@debian.org>
227
228         * cursor.c (psyco_curs_fetchone): fixed little memory leak
229         reported by Dieter Maurer.
230
231 2003-01-20  Federico Di Gregorio  <fog@debian.org>
232
233         * ZPsycopgDA/db.py (DB.tables/columns): added registration with
234         Zope's transaction machinery.
235
236         * Release 1.0.14.1.
237
238         * ZPsycopgDA/db.py: applied some fixes and cleanups by Dieter
239         Maurer (serialization problem were no more correctly detected!)
240
241         * Release 1.0.14.
242         
243         * Merged in 1.0.14.
244
245         * Import of 1.1.1 done.
246         
247         * Moved everything to cvs HEAD.
248
249 2003-01-20  Federico Di Gregorio  <fog@debian.org>
250
251         * ZPsycopgDA/connectionAdd.dtml: fixed typo (thanks to Andrew
252         Veitch.)
253
254         * typeobj.c (psyco_INTERVAL_cast): applied patch from Karl Putland
255         to fix problems with fractional seconds.
256
257 2002-12-03  Federico Di Gregorio  <fog@debian.org>
258
259         * Release 1.0.14-pre2.
260
261         * module.h: added macro for PyObject_TypeCheck if python version <2.2.
262
263         * typeobj.c (psyco_DBAPITypeObject_coerce): added error message to
264         coercion errors.
265
266 2002-12-02  Federico Di Gregorio  <fog@debian.org>
267
268         * Release 1.0.14-pre1.
269
270         * ZPsycopgDA/db.py (DB.sortKey): added sortKey().
271         
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
276         as it is right.]
277
278         * typeobj.c (psyco_DBAPITypeObject_coerce): Fixed coerce segfault
279         by checking explicitly for all the allowed types.
280
281 2002-11-25  Federico Di Gregorio  <fog@debian.org>
282
283         * doc/examples/*.py: added .rollback() to all exceptions before
284         deleteing the old table. 
285
286         * cursor.c: Apllied patch from John Goerzen (fix memory leak in
287         executemany).
288
289 2002-10-25  Federico Di Gregorio  <fog@debian.org>
290
291         * Release 1.0.13.
292
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
297         little bit clear.)
298
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.)
303
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.) 
307
308 2002-09-13  Federico Di Gregorio  <fog@debian.org>
309
310         * Release 1.0.12.
311
312         * Removed code to support COPY FROM/TO, will be added to new 1.1
313         branch to be released next week.
314
315         * cursor.c (_mogrify_seq): Fixed memory leak reported by Menno
316         Smits (values obtained by calling PySequence_GetItem are *new*
317         references!)
318
319 2002-09-07  Federico Di Gregorio  <fog@debian.org>
320
321         * cursor.c (_psyco_curs_execute): Added skeleton to support COPY
322         FROM/TO.
323
324 2002-09-06  Federico Di Gregorio  <fog@debian.org>
325
326         * configure.in: if libcrypt can't be found we probably are on
327         MacOS X: check for libcrypto, as suggested by Aparajita Fishman.
328
329 2002-09-03  Federico Di Gregorio  <fog@debian.org>
330
331         * ZPsycopgDA/db.py (DB.columns): Applied patch from Dieter Maurer
332         to allow the DA-browser to work with mixed case table names.
333
334 2002-08-30  Federico Di Gregorio  <fog@debian.org>
335
336         * ZPsycopgDA/DA.py (cast_DateTime): Applied patch from Yury to fix
337         timestamps (before they were returned with time always set to 0.)
338
339 2002-08-26  Federico Di Gregorio  <fog@debian.org>
340
341         * Release 1.0.11.1 (to fix a %&£$"! bug in ZPsycopgDA not
342         accepting psycopg 1.0.11 as a valid version.
343
344         * Release 1.0.11.
345
346 2002-08-22  Federico Di Gregorio  <fog@debian.org>
347
348         * Release 1.0.11pre2.
349
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. 
353
354         * doc/examples/integrity.py: added example and check for
355         IntegrityError.
356
357 2002-08-08  Federico Di Gregorio  <fog@debian.org>
358
359         * Release 1.0.11pre1.
360
361 2002-08-06  Federico Di Gregorio  <fog@debian.org>
362
363         * ZPsycopgDA/DA.py (cast_DateTime): patched as suggested by Tom
364         Jenkins; now it shouldwork with time zones too.
365
366 2002-08-01  Federico Di Gregorio  <fog@debian.org>
367
368         * ZPsycopgDA/DA.py (cast_DateTime): fixed problem with missing
369         AM/PM, as reported by Tom Jenkins.
370
371 2002-07-23  Federico Di Gregorio  <fog@debian.org>
372
373         * Fixed buglets reported by Mike Coleman.
374
375 2002-07-22  Federico Di Gregorio  <fog@debian.org>
376
377         * Release 1.0.10.
378
379 2002-07-14  Federico Di Gregorio  <fog@debian.org>
380
381         * Release 1.0.10pre2.
382         
383         * typeobj.c (psyco_LONGINTEGER_cast): fixed bad segfault by
384         INCREFfing Py_None when it is the result of a NULL conversion.
385
386 2002-07-04  Federico Di Gregorio  <fog@debian.org>
387
388         * Release 1.0.10pre1.
389         
390         * buildtypes.py (basic_types): added TIMESTAMPTZ to the types
391         converted by the DATE builtin.
392         
393         * ZPsycopgDA/DA.py (Connection.connect): Added version check.
394
395 2002-07-03  Federico Di Gregorio  <fog@debian.org>
396
397         * typeobj.c (psyco_XXX_cast): fixed bug reported by multiple users
398         by appliying Matt patch. 
399
400 2002-06-30  Federico Di Gregorio  <fog@debian.org>
401
402         * ZPsycopgDA/DA.py (Connection.set_type_casts): applied patch from
403         Tom Jenkins to parse dates with TZ.
404
405 2002-06-20  Federico Di Gregorio  <fog@debian.org>
406
407         * Preparing for release 1.0.9.
408
409         * Makefile.pre.in (dist): now we really include psycopg.spec.
410
411 2002-06-17  Federico Di Gregorio  <fog@debian.org>
412
413         * ZPsycopgDA/db.py (_finish, _abort): fixed problem with
414         connection left in invalid state by applying Tom Jenkins patch.
415
416 2002-06-06  Federico Di Gregorio  <fog@debian.org>
417
418         * ZPsycopgDA/db.py (DB._abort): fixed exception raising after an
419         error in execute triggerer deletion of self.db.
420
421 2002-05-16  Federico Di Gregorio  <fog@debian.org>
422
423         * cursor.c (psyco_curs_fetchone): None values passed to the
424         internal typecasters. 
425
426         * typeobj.c: added management of None to all the builtin
427         typecasters. 
428
429 2002-04-29  Federico Di Gregorio  <fog@debian.org>
430
431         * ZPsycopgDA/DA.py (cast_Time): applied 'seconds as a float' patch
432         from Jelle.
433
434 2002-04-23  Federico Di Gregorio  <fog@debian.org>
435
436         * Release 1.0.8.
437
438         * Makefile.pre.in: we now include win32 related files in the
439         distribution. 
440         
441         * connection.c (psyco_conn_destroy): fixed segfault reported by
442         Scott Leerssen (we were double calling _psyco_conn_close().)
443
444         * typemod.c (new_psyco_quotedstringobject): fixed memory stomping
445         catched by assert(); thanks to Matt Hoskins for reporting this
446         one.
447
448 2002-04-22  Federico Di Gregorio  <fog@debian.org>
449
450         * configure.in: grmpf. we need a VERSION file for windows, we'll
451         use it for configue and debian/rules too. 
452
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.
457
458 2002-04-07  Federico Di Gregorio  <fog@debian.org>
459
460         * Release 1.0.7.1.
461         
462         * configure.in: fixed little bug as reported by ron.
463
464 2002-04-05  Federico Di Gregorio  <fog@debian.org>
465
466         * Release 1.0.7?
467         
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
471         found" errors.
472
473         * Release 1.0.7. (Real this time.) (Ok, it was a joke....)
474
475 2002-04-03  Federico Di Gregorio  <fog@debian.org>
476
477         * configure.in: fixed problem with postgres versions in the format
478         7.2.x (sic.)
479
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.
484
485 2002-03-29  Federico Di Gregorio  <fog@debian.org>
486
487         * Release 1.0.7. Delayed.
488         
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!)
492
493         * typeobj.c (psyco_DATE_cast): fixed wrong managment of sign in
494         infinity.
495
496 2002-03-27  Federico Di Gregorio  <fog@debian.org>
497         
498         * configure.in (INSTALLOPTS): added AC_PROG_CPP test, now uses
499         AC_TRY_CPP to test for _all_ required mx includes.
500
501 2002-03-19  Federico Di Gregorio  <fog@debian.org>
502
503         * configure.in: added check for both pg_config.h and config.h to
504         detect postgres version.
505
506         * cursor.c: now None values are correctly handled when the format
507         string is not %s but %d, etc.
508
509 2002-03-08  Federico Di Gregorio  <fog@debian.org>
510
511         * ZPsycopgDA/DA.py: added MessageDialog import suggested by
512         Guido.
513
514 2002-03-07  Federico Di Gregorio  <fog@debian.org>
515
516         * psycopg.spec: added RPM specs by William K. Volkman.
517
518         * Release 1.0.6.
519         
520         * configure.in: imported changes to allow postgres 7.2 builds from
521         unstable branch.
522
523 2002-03-04  Federico Di Gregorio  <fog@debian.org>
524
525         * Release 1.0.5.
526
527         * applied table browser patch from Andy Dustman. 
528
529 2002-02-26  Federico Di Gregorio  <fog@debian.org>
530
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.
534
535 2002-02-20  Federico Di Gregorio  <fog@debian.org>
536
537         * configure.in: Release 1.0.4.
538
539 2002-02-12  Federico Di Gregorio  <fog@debian.org>
540
541         * ZPsycopgDA/db.py (DB.columns): fixed select to reenable column
542         expansion in table browsing.
543
544         * ZPsycopgDA/__init__.py: removed code that made psycopg think
545         double.  
546
547 2002-02-11  Federico Di Gregorio  <fog@debian.org>
548
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.)
552
553 2002-02-08  Federico Di Gregorio  <fog@debian.org>
554
555         * A little bug slipped in ZPsycopgDA, releasing 1.0.3 immediately.
556
557         * Release 1.0.2.
558         
559         * tests/check_types.py (TYPES): added check for hundredths of a
560         second. 
561
562 2002-02-07  Federico Di Gregorio  <fog@debian.org>
563
564         * typeobj.c (psyco_INTERVAL_cast): patched to correct wrong
565         interpretation of hundredths of a second (patch from
566         A. R. Beresford, kudos!)
567
568 2002-01-31  Federico Di Gregorio  <fog@debian.org>
569
570         * FAQ: added.
571
572 2002-01-16  Federico Di Gregorio  <fog@debian.org>
573
574         * Preparing for release 1.0.1.
575         
576         * cursor.c (alloc_keeper): removed ALLOW_THREADS wrapper around
577         PQconnectdb: libpq calls crypt() that is *not* reentrant.
578
579 2001-12-19  Federico Di Gregorio  <fog@debian.org>
580
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!)
584
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,
587         ouch!)
588         
589 2001-12-17  Federico Di Gregorio  <fog@debian.org>
590
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.)
595
596 2001-12-13  Federico Di Gregorio  <fog@debian.org>
597
598         * cursor.c: fixed memory leak due to extra strdup (thanks
599         to Leonardo Rochael Almeida.)
600
601 2001-11-14  Federico Di Gregorio  <fog@debian.org>
602
603         * Release 1.0. 
604
605         * doc/README: added explanation about guide work in progess but
606         examples working.
607
608         * debian/*: lots of changes to release 1.0 in debian too.
609
610 2001-11-12  Federico Di Gregorio  <fog@debian.org>
611
612         * RELEASE-1.0: added release file, to celebrate 1.0.
613
614         * tests/zope/typecheck.zexp: regression test on types for zope.
615
616 2001-11-11  Federico Di Gregorio  <fog@debian.org>
617
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.
621
622 2001-11-09  Federico Di Gregorio  <fog@debian.org>
623
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. 
627
628 2001-11-08  Federico Di Gregorio  <fog@debian.org>
629
630         * ZPsycopgDA/DA.py (Connection.set_type_casts): added mx INTERVAL
631         type restore.
632
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
635         the code.
636
637 2001-11-7  Federico Di Gregorio,  <fog@debian.org>
638
639         * Makefile.pre.in: fixed small problem with zcat on True64 
640         (thank you stefan.)
641
642 2001-11-06  Federico Di Gregorio  <fog@debian.org>
643
644         * ZPsycopgDA/db.py (DB.query): added fix for concurrent update
645         from Chris Kratz.
646
647 2001-11-05  Federico Di Gregorio  <fog@debian.org>
648
649         * cursor.c: now we include postgres.h if InvalidOid is still
650         undefined after all other #includes.
651
652         * README: clarified use of configure args related to python
653         versions.
654
655         * aclocal.m4: patched to work with symlinks installations (thanks
656         to Stuart Bishop.)
657
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
660         switching back.)
661
662 2001-11-01  Federico Di Gregorio  <fog@debian.org>
663
664         * doc/examples/dt.py: added example on how to use the date and
665         time constructors. 
666
667         * Makefile.pre.in (dist-zope): removed dependencies on GNU install
668         and tar commands. Also a little general cleanup on various targets.
669
670         * ZPsycopgDA/DA.py: fixed mx.DateTime importing. 
671
672 2001-10-31  Federico Di Gregorio  <fog@debian.org>
673
674         * typemod.c (psyco_xxxFromMx): fixed bug in argument parsing (we
675         weren't usigng the right type object.) 
676
677         * aclocal.m4: now builds OPT and LDFLAGS on the values of the env
678         variables instead of overwriting them.
679
680         * Makefile.pre.in (CFLAGS): removed -Wall, you can add it back at
681         compile time with OPT="-Wall" ./configure ...
682
683         * Setup.in (OPT): removed -Wall.
684
685 2001-10-30  Michele Comitini <mcm@initd.net>
686
687         * module.h: ANSI C compatibility patch from Daniel Plagge.
688         
689 2001-10-30  Federico Di Gregorio  <fog@debian.org>
690
691         * README: added common building problems and solutions.
692
693         * configure.in: removed check for install command, already done by
694         james's aclocal.m4 for python. removed install-sh. removed -s from
695         INSTALLOPTS.
696
697 2001-10-29  Federico Di Gregorio  <fog@debian.org>
698
699         * Makefile.pre.in (dist): removed examples/ directory from
700         distribution. 
701
702         * merge with cvs head. preparing to fork again on PSYCOPG-1-0 (i
703         admit BRANCH_1_0 was quite a silly name.)
704
705         * doc/examples/usercast.py: now works. 
706
707         * connection.c (curs_rollbackall): fixed little bug (exposed by
708         the deadlock below) by changing KEEPER_READY to KEEPER_READY.
709
710         * doc/examples/commit.py: deadlock problem solved, was the
711         example script, _not_ psycopg. pew... :)
712
713         * examples/*: removed the examples moved to doc/examples/.
714         
715         * doc/examples/commit.py,dictfetch.py: moved from examples/ and
716         changed to work for 1.0. unfortunately commit.py locks psycopg!!!
717
718 2001-10-24  Federico Di Gregorio  <fog@debian.org>
719
720         * modified all files neede for the 1.0 release.
721
722         * configure.in (MXFLAGS): removed electric fence support.
723
724         * Makefile.pre.in (dist): now we remove CVS working files before
725         packing the tarball.
726
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
730         about datatypes.
731         
732         * doc/examples: moved new example code to examples directory, old
733         tests and code samples will stay in examples/ until the manual will
734         be finished.
735
736 2001-10-16  Federico Di Gregorio  <fog@debian.org>
737
738         * typeobj.c (psyco_INTERVAL_cast): completely revised interval
739         casting code. (psyco_TIME_cast): we use the unix epoch when the
740         date is undefined. 
741
742         * cursor.c (psyco_curs_executemany): modified sanity check to
743         accept sequences of tuples too and not just dictionaries.
744
745 2001-10-15  Federico Di Gregorio  <fog@debian.org>
746
747         * typeobj.c (psyco_INTERVAL_cast): fixed bug caused by wrong
748         parsing on '1 day' (no hours, minutes and seconds.)
749
750 2001-10-15  Michele Comitini  <mcm@initd.net>
751
752         * cursor.c (_execute): use the correct cast functions even on
753         retrival of binary cursors.
754
755 2001-10-12  Federico Di Gregorio  <fog@debian.org>
756
757         * typemod.c (new_psyco_bufferobject): space not quoted anymore,
758         smarter formula to calculate realloc size.
759
760         * cursor.c (psyco_curs_fetchone): removed static tuple (using
761         static variable in multithreaded code is *crazy*, why did i do it? 
762         who knows...)
763
764         * typeobj.c (psyco_init_types): exports the binary converter (will
765         be used in cursor.c:_execute.)
766
767         * typeobj.h: added export of psyco_binary_cast object.
768
769 2001-10-05  Federico Di Gregorio  <fog@debian.org>
770
771         * cursor.c (_psyco_curs_execute): added missing Py_XDECREF on
772         casts list.
773
774         * Makefile.pre.in (dist): added install-sh file to the
775         distribution. 
776
777         * replaced PyMem_DEL with PyObject_Del where necessary.
778         
779         * connection.c (psyco_conn_destroy): added missing
780         pthread_mutex_destroy on keeper lock.
781
782 2001-10-01  Michele Comitini  <mcm@initd.net>
783
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.
788
789         * cursor.c: #include <postgres.h>
790
791         * module.h: now debugging should be active only when asked by
792         ./configure --enable-devel
793         
794 2001-09-29  Federico Di Gregorio  <fog@debian.org>
795
796         * cursor.c (new_psyco_cursobject): added locking of connection,
797         still unsure if necessary.
798
799 2001-09-26  Federico Di Gregorio  <fog@debian.org>
800
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
804         need it anymore.
805
806         * general #include cleanup, should compile on MacOS X too.
807
808         * typeobj.c (psyco_DATE_cast): uses sscanf. should be faster too. 
809         (psyco_TIME_cast): dixit.
810
811         * applied patch from Daniel Plagge (SUN cc changes.)
812         
813 2001-09-22  Federico Di Gregorio  <fog@debian.org>
814
815         * ZPsycopgDA/db.py (DB._finish, DB._begin): fix for the 
816         self.db == None problem.
817
818 2001-09-19  Michele Comitini  <mcm@initd.net>
819
820         * typemod.c (new_psyco_bufferobject): better memory managment
821         (now it allocates only needed space dinamically).
822
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.
826
827 2001-09-18  Federico Di Gregorio  <fog@debian.org>
828
829         * typeobj.c (psyco_INTERVAL_cast): fixed interval conversion
830         (hours were incorrectly converted into seconds.)
831
832 2001-09-17  Federico Di Gregorio  <fog@debian.org>
833
834         * cursor.c (_mogrify_seq, _mogrify_dict): added check for None
835         value and conversion of None -> NULL (fixes bug reported by Hamish
836         Lawson.)
837
838 2001-09-12  Federico Di Gregorio  <fog@debian.org>
839
840         * module.c: added handles to new date and time conversion
841         functions (see below.)
842
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. 
846
847 2001-09-10  Federico Di Gregorio  <fog@debian.org>
848
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... 
855
856         * cursor.c (psyco_curs_lastoid): added method to get oid of the
857         last inserted row (it was sooo easy, it even works...) 
858
859 2001-09-08  Federico Di Gregorio  <fog@debian.org>
860
861         * typeobj.c (psyco_INTERVAL_cast): added casting function for the
862         postgres INTERVAL and TINTERVAL types (create a DateTimeDelta
863         object.)  
864
865 2001-09-05  Federico Di Gregorio  <fog@debian.org>
866
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.
872         
873         * connection.c (curs_rollbackall, curs_commitall): removed calls
874         to begin_pgconn, see above. 
875
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
879         mxDateTime >= 2.0.0.
880
881 2001-09-04  Federico Di Gregorio  <fog@debian.org>
882
883         * doc/*.tex: added documentation directory and skeleton of the
884         psycopg guide. 
885
886 2001-09-03  Federico Di Gregorio  <fog@debian.org>
887
888         * merged in changes from HEAD (mostly mcm fixes to binary
889         objects.)
890
891         * preparing for release 0.99.6.
892
893 2001-09-03  Michele Comitini  <mcm@initd.net>
894
895         * typemod.c: much faster Binary encoding routine.
896         
897         * typeobj.c: much faster Binary decoding routine.       
898
899 2001-08-28  Michele Comitini  <mcm@initd.net>
900
901         * typemod.c: Working binary object to feed data to bytea type
902         fields.
903
904         * typeobj.c: Added BINARY typecast to extract data from
905         bytea type fields.
906
907         * cursor.c: Added handling for SQL binary  cursors.
908
909 2001-08-3  Michele Comitini <mcm@initd.net>
910
911         * cursor.c: fixed DATESTYLE problem thanx to Steve Drees.
912
913 2001-07-26  Federico Di Gregorio  <fog@debian.org>
914
915         * Makefile.pre.in: applied change suggested by Stefan H. Holek to
916         clobber and distclean targets.
917
918 2001-07-23  Federico Di Gregorio  <fog@debian.org>
919
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. 
923
924 2001-07-17  Federico Di Gregorio  <fog@debian.org>
925
926         * configure.in: Release 0.99.5.
927
928 2001-07-12  Federico Di Gregorio  <fog@debian.org>
929
930         * debian/* fixed some little packaging problems.
931
932 2001-07-11  Federico Di Gregorio  <fog@debian.org>
933
934         * cursor.c, typeobj.c: removed some Py_INCREF on PyDict_SetItem
935         keys and values to avoid memory leaks.
936
937 2001-07-03  Federico Di Gregorio  <fog@debian.org>
938
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(). 
943
944 2001-07-02  Federico Di Gregorio  <fog@debian.org>
945
946         * Release 0.99.4.
947
948         * typemod.c: added QuotedString class and methods.
949
950         * module.c: added QuotedString method to module psycopg.
951
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
956         object. 
957
958         * typemod.h: added definition of QuotedString object.
959         
960 2001-06-28  Federico Di Gregorio  <fog@debian.org>
961
962         * ZPsycopgDA/db.py, ZPsycopgDA/DABase.py: applied patch sent by
963         yury to fix little buglet. 
964
965 2001-06-22  Federico Di Gregorio  <fog@debian.org>
966
967         * Release 0.99.3.
968         
969         * connection.c (new_psyco_connobject): now we strdup dsn, as a fix
970         for the problem reported by Jack Moffitt.
971
972         * Ok, this will be the stable branch from now on...
973
974         * Merged in stuff from 0.99.3. About to re-branch with a better
975         name (BRANCH_1_0)
976
977 2001-06-20  Federico Di Gregorio  <fog@debian.org>
978
979         * Release 0.99.3. Showstoppers for 1.0 are:
980             - documentation
981             - mxDateTime module loading
982             - bug reported by Yury.
983         
984         * Integrated patches from Michele:
985             - searching for libcrypt in configure now works
986             - removed memory leak in asprintf.c
987
988 2001-06-15  Federico Di Gregorio  <fog@debian.org>
989
990         * ZPsycopgDA/__init__.py (initialize): applied patch from Jelle to
991         resolve problem with Zope 2.4.0a1.
992
993 2001-06-14  Federico Di Gregorio  <fog@debian.org>
994
995         * configure.in: added code to check for missing functions (only
996         asprintf at now.)
997
998         * asprintf.c: added compatibility code for oses that does not have
999         the asprintf() function.
1000
1001 2001-06-10  Federico Di Gregorio  <fog@debian.org>
1002
1003         * Branched PSYCOPG_0_99_3. Development will continue on the cvs
1004         HEAD, final adjustements and bugfixing should go to this newly
1005         created branch.
1006
1007 2001-06-08  Michele Comitini  <mcm@initd.net>
1008
1009         * ZPsycopgDA/DA.py: DateTime casts simplified and corrected
1010         as suggested by Yury.
1011
1012 2001-06-05  Federico Di Gregorio  <fog@debian.org>
1013
1014         * Release 0.99.2.
1015
1016         * Makefile.pre.in (dist): added typemod.h and typemod.c to
1017         distribution.
1018         
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.
1024
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')
1029
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
1034         conversion.
1035
1036 2001-06-01  Federico Di Gregorio  <fog@debian.org>
1037
1038         * Release 0.5.5.
1039
1040         * module.h: better error message when trying to commit on a
1041         cursor derived from serialized connection.
1042         
1043         * ZPsycopgDA/db.py (DB.close): now self.cursor is set to None when
1044         the connection is closed.
1045
1046         * module.c (initpsycopg): added missing (sic) DBAPI module
1047         parameters (paramstyle, apilevel, threadsafety, etc...)
1048
1049 2001-05-24  Michele Comitini  <mcm@initd.net>
1050
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 :).
1054
1055         * cursor.c: more aggressive cleanup of postgres results
1056         to avoid the risk of memory leaking.
1057
1058         * typeobj.c, connection.c: deleted some Py_INCREF which
1059         wasted memory.
1060
1061 2001-05-18  Federico Di Gregorio  <fog@debian.org>
1062
1063         * Release 0.5.4.
1064
1065 2001-05-17  Michele Comitini  <mcm@initd.net>
1066
1067         * ZPsycopgDA/db.py: The connection closed by the management
1068         interface of zope now raises error instead of reopening itself.
1069
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
1072         cursor.
1073
1074 2001-05-07  Federico Di Gregorio  <fog@debian.org>
1075
1076         * Release 0.5.3.
1077         
1078         * Merged in changes from me and mcm.
1079
1080 2001-05-06  Michele Comitini  <mcm@initd.net>
1081
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
1084         method definition.
1085
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).
1089
1090 2001-05-04  Federico Di Gregorio  <fog@debian.org>
1091
1092         * ZPsycopgDA/db.py: added .close() method (as suffested by Andre
1093         Schubert.)
1094
1095 2001-05-04  Michele Comitini  <mcm@initd.net>
1096
1097         * module.h: working on a closed object now raises an
1098         InterfaceError.
1099
1100         * ZPsycopgDA/db.py: fixed problems with dead connections detection.
1101
1102         * ZPsycopgDA/__init__.py: corrected SOFTWARE_HOME bug for zope
1103         icon.
1104
1105 2001-05-04  Federico Di Gregorio  <fog@debian.org>
1106
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.
1111
1112 2001-05-03  Federico Di Gregorio  <fog@debian.org>
1113
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
1117         fixes... (?!)
1118
1119         * module.h: removes stdkeeper field from connobject, we don't need
1120         it anymore.
1121
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.
1125
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.
1130
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...
1134         
1135         * cursor.c (psyco_curs_autocommit): added exception if the
1136         cursor's keeper is shared between more than 1 cursor.
1137
1138         * module.h (EXC_IFCRITICAL): added this macro that call
1139         pgconn_resolve_critical) on critical errors.
1140
1141         * cursor.c (alloc_keeper): added check for pgres == NULL. 
1142
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.
1146
1147 2001-05-03  Michele Comitini  <mcm@initd.net>
1148
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
1152         of psycopg.
1153
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
1159         soon.
1160
1161 2001-04-26  Federico Di Gregorio  <fog@debian.org>
1162
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
1166         floats.
1167
1168         * michele applied patch from Ivo van der Wijk to make zpsycopgda
1169         behave better when INSTANCE_HOME != SOFTWARE_HOME.
1170
1171         * cursor.c (_psyco_curs_execute): also fill the 'columns' field.
1172
1173         * module.h: added a 'columns' field to cursobject, to better
1174         support the new dictionary fetch functions (dictfetchone(),
1175         dictfetchmany(), dictfetchall().)
1176
1177         * cursor.c: added the afore-mentioned functions (function names
1178         are not definitive, they will follow decisions on the DBAPI SIG.)
1179
1180 2001-04-03  Federico Di Gregorio  <fog@debian.org>
1181
1182         * Release 0.5.1.
1183
1184         * mcm fixed a nasty bug by correcting a typo in module.h.
1185
1186 2001-03-30  Federico Di Gregorio  <fog@debian.org>
1187
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.)
1191
1192         * Makefile.pre.in (dist): fixed little bug, a missing -f argument
1193         to rm.
1194
1195         * examples/thread_test.py: removed all extension cruft.
1196
1197         * examples/thread_test_x.py: this one uses extensions like the
1198         per-cursor commit, autocommit, etc.
1199
1200         * README (psycopg): added explanation on how .serialize() works. 
1201
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.
1205
1206 2001-03-20  Federico Di Gregorio  <fog@debian.org>
1207
1208         * cursor.c (_psyco_curs_execute): replaced some fields in
1209         description with None, as suggested on the DB-SIG ML.
1210
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.
1215
1216 2001-03-19  Michele Comitini  <mcm@initd.net>
1217
1218         * cursor.c: added mutexes, they do not interact well with python
1219         threads :(.
1220
1221 2001-03-16  Michele Comitini  <mcm@initd.net>
1222
1223         * ZPsycopgDA/db.py (ZDA): some fixes in table browsing.
1224
1225 2001-03-16  Federico Di Gregorio  <fog@debian.org>
1226
1227         * suite/tables.postgresql (TABLE_DESCRIPTIONS): fixed some typos
1228         introduced by copying by hand the type values from pg_type.h.
1229
1230         * suite/*: added some (badly) structured code to test for
1231         DBAPI-2.0 compliance.
1232        
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. 
1236
1237         * connection.c: removed 'autocommit' attribute, now is a method as
1238         specified in the DBAPI-2.0 document.
1239
1240 2001-03-15  Federico Di Gregorio  <fog@debian.org>
1241
1242         * connection.c (curs_commitall): splitted for cycle in two to
1243         avoid the "bad snapshot" problem.
1244
1245 2001-03-14  Federico Di Gregorio  <fog@debian.org>
1246
1247         * Release 0.4.6.
1248         
1249         * cursor.c (_psyco_curs_execute): fixed nasty bug, there was an
1250         free(query) left from before the execute/callproc split.
1251
1252         * Preparing for 0.4.6.
1253
1254 2001-03-13  Federico Di Gregorio  <fog@debian.org>
1255
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?) 
1263
1264         * configure.in: removed some cruft (old comments and strncasecmp()
1265         check)
1266
1267 2001-03-12  Federico Di Gregorio  <fog@debian.org>
1268
1269         * examples/thread_test.py: added moronic argument parsing: now you
1270         can give the dsn string on the command line... :(
1271
1272         * Release 0.4.5.
1273
1274 2001-03-10  Federico Di Gregorio  <fog@debian.org>
1275
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.)
1279
1280 2001-03-09  Federico Di Gregorio  <fog@debian.org>
1281
1282         * Release 0.4.4.
1283
1284         * ZPsycopgDA/db.py: michele fixed a nasty bug here. 
1285
1286 2001-03-08  Federico Di Gregorio  <fog@debian.org>
1287
1288         * Release 0.4.3.
1289
1290 2001-03-07  Federico Di Gregorio  <fog@debian.org>
1291
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
1295         rebuild.
1296
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.
1300
1301         * cursor.c (psyco_curs_fetchone): removed strdup() call. added
1302         PQgetisnull() test to differentiate between real NULLs and empty
1303         strings.
1304
1305         * Removed cursor.py (mcm, put tests in examples) and fixed some
1306         typos in the dtml code.
1307
1308 2001-03-04  Michele Comitini  <mcm@initd.net>
1309
1310         * examples/commit_test.py: Modifications to test argument passing
1311         and string substitution to cursor functions, nothing more.
1312
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.
1317
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.
1322
1323
1324 2001-03-02  Federico Di Gregorio  <fog@debian.org>
1325
1326         * examples commit_test.py: added code to test autocommit.
1327         
1328         * examples/thread_test.py (ab_select): modified select thread to
1329         test autocommit mode.
1330
1331         * Release 0.4.1.
1332         
1333         * module.h, connection.c, cursor.c: added autocommit support.
1334
1335 2001-02-28  Federico Di Gregorio  <fog@debian.org>
1336
1337         * Release 0.4.
1338
1339 2001-02-27  Michele Comitini  <mcm@initd.net>
1340
1341         * cursor.py: cut some unuseful code in psyco_curs_fetchmany() and
1342         psyco_curs_fetchall() inserted an assert in case someting goes
1343         wrong.
1344
1345 2001-02-27  Federico Di Gregorio  <fog@debian.org>
1346
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.)  
1350
1351         * examples/type_test.py: better and more modular tests. 
1352
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.)
1356
1357 2001-02-26  Federico Di Gregorio  <fog@debian.org>
1358
1359         * releasing 0.3 (added NEWS file.)
1360
1361 2001-02-26  Michele Comitini  <mcm@initd.net>
1362
1363         * cursor.c: fetchmany() some cleanup done.
1364
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
1368         a try.
1369         
1370 2001-02-26  Federico Di Gregorio  <fog@debian.org>
1371
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
1375         last!
1376
1377         * module.h (Dprintf): added pid to every Dprintf() call, to
1378         facilitate multi-threaded debug.
1379
1380 2001-02-26  Michele Comitini  <mcm@initd.net>
1381
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.
1385
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.
1388
1389 2001-02-26  Federico Di Gregorio  <fog@debian.org>
1390
1391         * configure.in: stepped up version to 0.3, ready to release
1392         tomorrow morning. added check for path to DateTime module. 
1393
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
1397         object. nice. 
1398
1399 2001-02-24  Federico Di Gregorio  <fog@debian.org>
1400
1401         * cursor.c (psyco_curs_fetchone): now an error in the python
1402         callback when typecasting results raise the correct exception.
1403
1404         * typeobj.c (psyco_DBAPITypeObject_call): removed extra Py_INCREF().
1405
1406 2001-02-23  Federico Di Gregorio  <fog@debian.org>
1407
1408         * replaced every single instance of the string 'pgpy' with 'psyco'
1409         (this was part of the general cleanup.)
1410         
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
1413         objects.)  
1414
1415         * typeobj.c: general cleanup. fixed some bugs related to
1416         refcounting (again!)
1417
1418         * cursor.c: general cleanup. (request_pgconn) simplified by adding
1419         a support function (_extract_pgconn.)
1420
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.
1425
1426         * module.h: general cleanup.
1427
1428         * typeobj.h: general cleanup, better comments, made some function
1429         declarations extern. 
1430
1431         * module.c: general cleanup, double-checked every function for
1432         memory leaks. (pgpy_connect) removed unused variable 'connection'.
1433
1434 2001-02-22  Federico Di Gregorio  <fog@debian.org>
1435
1436         * typeobj.c: fixed lots of bugs, added NUMBER type object. now the
1437         basic tests in type_test.py work pretty well.
1438
1439         * cursor.c (pgpy_curs_fetchmany): fixed little bug, fetchmany()
1440         reported one less row than available.
1441
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
1444         bit.
1445
1446 2001-02-21  Federico Di Gregorio  <fog@debian.org>
1447
1448         * typeobj.c: separated type objects stuff from module.c
1449         
1450         * typeobj.h: separated type objects stuff from module.h 
1451
1452 2001-02-19  Federico Di Gregorio  <fog@debian.org>
1453
1454         * cursor.c (pgpy_curs_fetchmany): now check size and adjust it to
1455         be lesser or equal than the nuber of available rows.
1456
1457 2001-02-18  Michele Comitini  <mcm@initd.net>
1458
1459         * module.c, module.h: added optional args maxconn and minconn to
1460         connection functions
1461
1462         * cursor.c: better error checking in request_pgconn.
1463
1464         * connection.c: changed new_connect_obj to take as optional args
1465         maxconn and minconn. Added the corresponding ro attributes to
1466         connection objects.
1467
1468         * cursor.py: added some code to stress test cursor reusage.
1469
1470         * cursor.c: some fixes on closed cursors.
1471
1472         * connection.c: corrections on some assert calls.
1473
1474 2001-02-16  Federico Di Gregorio  <fog@debian.org>
1475
1476         * configure.in: added --enable-priofile sqitch. changed VERSION to
1477         0.2: preparing for a new release.
1478
1479         * cursor.c: added a couple of asserts.
1480
1481 2001-02-16  Michele Comitini  <mcm@initd.net>
1482
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.
1486
1487         * module.h: some syntax error fixed.  Error in allocating a tuple
1488         corrected in macro DBAPITypeObject_NEW().
1489         
1490         * module.c: pgpy_DBAPITypeObject_init() is not declared static anymore.
1491
1492         * cursor.c: executemany() now does not create and destroy tuples
1493         for each list item, so it is much faster.
1494
1495 2001-02-14  Michele Comitini  <mcm@initd.net>
1496
1497         * cursor.c:  added again Py_DECREF on the cpcon after disposing
1498         it.  assert() with -DNDEBUG makes the driver segfault while it
1499         should not.
1500         
1501
1502 2001-02-13  Federico Di Gregorio  <fog@debian.org>
1503
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.
1507         
1508         * connection.c (pgpy_conn_destroy): replaced some impossible ifs
1509         with aseert()s.
1510
1511         * cursor.c (pgpy_curs_close): added Py_DECREF() to
1512         self->descritpion to prevent a memory leak after an execute().
1513
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.
1517
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.
1521
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.
1526
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.
1530         
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!)
1534
1535 2001-02-12  Federico Di Gregorio  <fog@debian.org>
1536
1537         * INSTALL: removed wok cruft from head of this file.
1538
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.)
1543
1544         * autogen.sh: added option --dont-run-configure. 
1545
1546 2001-02-09  Federico Di Gregorio  <fog@debian.org>
1547
1548         * module.c (initpsycopg): changed name of init function to match
1549         new module name (also changed all the exception definitions.)
1550
1551         * README: updated psycopg description (we have a new name!)
1552
1553         * Ready for 0.1 release.
1554
1555 2001-02-07  Michele Comitini  <mcm@initd.net>
1556
1557         * cursor.c: now executemany takes sequences and not just
1558         tuples 
1559
1560 2001-02-07  Federico Di Gregorio  <fog@debian.org>
1561
1562         * Makefile.pre.in: now dist target includes test programs
1563         (thread_test.py) and README and INSTALL files. 
1564
1565         * configure.in: changed --with-devel to --enable-devel. little
1566         cosmetical fixes to the option management.
1567         
1568         * connection.c, module.c, cursor.c, module.h: removed 'postgres/'
1569         from #include directive. it is ./configure task to find the right
1570         directory.
1571
1572         * thread_test.py: added thread testing program.
1573
1574 2001-02-07  Michele Comitini  <mcm@initd.net>
1575
1576         * cursor.c: added code to allow threads during PQexec() calls.
1577         
1578         * cursor.c: added begin_pgconn to rollback() and commit()
1579         so that the cursror is not in autocommit mode.
1580
1581         * cursor.c: added rollback() and commit() methods to cursor
1582         objects.
1583
1584
1585 2001-02-07  Federico Di Gregorio  <fog@debian.org>
1586
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.)
1590
1591 2001-02-07  Michele Comitini  <mcm@initd.net>
1592
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
1598         to be executed.
1599
1600         * cursor.c: some more checking to avoid trying to close
1601         already close pgconnections.
1602
1603 2001-02-06  Federico Di Gregorio  <fog@debian.org> 
1604
1605         * Makefile.pre.in (CFLAGS): added -Wall to catch bad programming
1606         habits. 
1607
1608         * cursor.c, connection.c: lots of fixes to the destroy stuff. now
1609         all the cursor are destroyed *before* the connection goes away.
1610
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.
1615
1616         * merged changes done by mcm.
1617
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.
1622
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. 
1626
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.
1630
1631 2001-02-02  Michele Comitini  <mcm@initd.net>
1632
1633         * cursor.c (Repository): Added functions for managing a connection
1634         pool. Segfaults.
1635
1636         * configure.in (Repository): removed check for mxdatetime headers.
1637
1638 2001-01-24  Federico Di Gregorio  <fog@debian.org>
1639
1640         * first checkout from shinning new init.d cvs.
1641
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
1645         script.)
1646
1647 2001-01-21  Michele Comitini  <mcm@initd.net>
1648
1649         * cursor.c (Repository): commit, abort, begin functions now check
1650         the right exit status of the command.
1651
1652         * connection.c (Repository): working commit() and rollback()
1653         methods.
1654
1655 2001-01-20  Michele Comitini  <mcm@initd.net>
1656
1657         * module.h (Repository): added member to cursor struct to handle
1658         queries without output tuples.
1659
1660         * cursor.c (Repository): new working methods: executemany,
1661         fetchone, fetchmany, fetchall.
1662
1663 2001-01-18  Michele Comitini  <mcm@initd.net>
1664
1665         * cursor.c (Repository): close working. destroy calling close.
1666         close frees pg structures correctly.
1667
1668         * connection.c (Repository): close method working.  destroy seems
1669         working.
1670
1671 2001-01-17  Michele Comitini  <mcm@initd.net>
1672
1673         * cursor.c (Repository): now each python cursor has its own
1674         connection.  Each cursor works in a transaction block.
1675
1676         * connection.c (Repository): added cursor list to connection
1677         object
1678
1679 2001-01-14  Michele Comitini  <mcm@initd.net>
1680
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.
1684
1685         * connection.c (Repository): Added some error checking code for pg
1686         connection (will be moved to cursor?).
1687
1688 2001-01-13  Michele Comitini  <mcm@initd.net>
1689
1690         * connection.c (Repository): Added error checking in connection
1691         code to fail if connection to the db could not be opened.
1692
1693         * module.h (Repository): New macro to help creating
1694         DBAPITypeObjects.
1695
1696         * module.c (Repository): DBAPITypeObject __cmp__ function is now
1697         very simplified using recursion.
1698
1699         * module.h (Repository): "DBAPIObject" changed to
1700         "DBAPITypeObject".
1701
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.
1705
1706 2001-01-08  Michele Comitini  <mcm@initd.net>
1707
1708         * module.c (Repository): Corrected the exception hierarcy
1709
1710         * connection.c (Repository): Begun to use the connection objects
1711         of libpq
1712
1713 2001-01-07  Michele Comitini  <mcm@initd.net>
1714
1715         * module.c (Repository): Added the Date/Time functions.
1716
1717 2001-01-06  Michele Comitini  <mcm@initd.net>
1718
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.
1722
1723 2001-01-05  Michele Comitini  <mcm@initd.net>
1724
1725         * module.c (Repository): Test version; module loaded with 
1726         exception defined.
1727         
1728 2001-01-05  Michele Comitini  <mcm@initd.net>
1729
1730         * Setup.in (Repository): Setup file.
1731
1732         * Makefile.pre.in (Repository): from the python source.
1733
1734 2001-01-05  Michele Comitini  <mcm@initd.net>
1735
1736         * module.c: Written some code for defining exceptions.
1737         
1738         * module.h: Static variable for exceptions.
1739         
1740 2001-01-04  Michele Comitini  <mcm@initd.net>
1741
1742         * Changelog: pre-release just a few prototypes to get started.
1743         
1744