1
2004-10-29 Federico Di Gregorio <fog@debian.org>
3
* cursor.c (_mogrify): fixed problem with %% not being transformed
4
into % when calling .execute() with a zero-length tuple or dict.
6
2004-9-27 Federico Di Gregorio <fog@lana.initd.org>
8
* cursor.c (_psyco_curs_execute): atoi->atol as suggested by Sylvain
11
2004-09-17 Federico Di Gregorio <fog@debian.org>
13
* ZPsycopgDA/DA.py (cast_DateTime): implemented suggestion by
14
Andreas Jung to speed-up cast_Date and cast_dateTime. cast_Time
15
will need some more work.
17
2004-09-11 Federico Di Gregorio <fog@debian.org>
19
* connection.c (_psyco_conn_close): applied "trivial patch" by
1
2004-10-14 Federico Di Gregorio <fog@debian.org>
3
* psycopg/cursor_type.c (_psyco_curs_buildrow_fill): now we use
4
PySequence_SetItem to avoid problems with containers created from
5
cursor's .tuple_factory attribute.
7
* lib/extras.py (DictCursor.execute): fixed stupid bug with cursor
8
setting self.tuplefactory instead of self.tuple_factory.
10
2004-10-02 Federico Di Gregorio <fog@debian.org>
14
* psycopg/cursor_type.c (_psyco_curs_buildrow_*): unified normal
15
and factory code into the _psyco_curs_buildrow_fill function; no
16
more memory leaks here.
18
* psycopg/config.h (round): added check for __FreeBSD__ (that
19
should be defined when compiling with gcc, I hope.)
21
* setup.py: removed a lot of code now in setup.cfg.
23
2004-09-24 Federico Di Gregorio <fog@debian.org>
25
* psycopg/cursor_type.c (cursor_dealloc): fixed small memory leak
26
due to missing disposal of self->pgres.
28
2004-9-14 Federico Di Gregorio <fog@initd.org>
30
* examples/dialtone.py: Added adapt() example by Valentino
33
2004-09-14 Federico Di Gregorio <fog@debian.org>
35
* psycopg/microprotocols.c (microprotocols_adapt): lots of changes
36
to the microprotocols layer (it is not micro anymore);
37
implementing almost all the PEP 246. The adapter registry is now
38
indexed by (type, protocol) and not by type alone.
40
2004-09-13 Federico Di Gregorio <fog@debian.org>
42
* psycopg/cursor_type.c (_mogrify): and qattr is gone.
44
2004-09-05 Federico Di Gregorio <fog@debian.org>
46
* Release 1.99.9 (or, the "twisting by the pool" release).
48
* psycopg/pqpath.c (_pq_fetch_tuples): changed to "static void"
49
instead of "static int", no ways for this function to fail.
22
51
2004-09-04 Federico Di Gregorio <fog@debian.org>
24
* cursor.c (_psyco_curs_execute): fixed rowcount by using
25
PQcmdTuples as suggested by Vsevolod Lobko.
53
* psycopg/pqpath.c (_pq_fetch_tuples): ported rowcount fix from
56
* ZPsycopgDA/*: ZPsycopgDA back in action, using the new pooling
59
2004-08-29 Federico Di Gregorio <fog@debian.org>
61
* psycopg/typecast_basic.c (typecast_DECIMAL_cast): added DECIMAL
62
typecaster; it even works :).
64
* scripts/buildtypes.py (basic_types): added DECIMAL typecaster
67
* examples/threads.py: updated threads example to use pooling code.
69
* lib/pool.py: added very simple and thread-safe connection
72
* psycopg/cursor_type.c (psyco_curs_fetchmany): fixed problem with
73
.fetchall() and .fetchmany() returning None instead of [] on empty
78
2004-08-28 Federico Di Gregorio <fog@debian.org>
80
* psycopg/cursor_type.c (psyco_curs_execute): added processing of
83
* examples/encoding.py: much better encoding example, also using
84
the new UNICODE typecaster.
86
* psycopg/typecast_basic.c (typecast_UNICODE_cast): added UNICODE
89
* lib/extensions.py: the encodings dictionary is not available by
90
default but can be accessed from the psycopg.extensions module.
92
* psycopg/adapter_qstring.h: remove encoding information from
93
qstring adapter and moved it into psycopg module.
95
2004-08-26 Federico Di Gregorio <fog@debian.org>
97
* psycopg/cursor_type.c (_psyco_curs_prefetch): added check for
98
asynchronous fetch by wrong cursor.
100
* psycopg/pqpath.c (pq_fetch): fixed backend status message (bug
101
reported by Daniele Varrazzo.)
27
103
2004-07-29 Federico Di Gregorio <fog@debian.org>
31
* cursor.c (_psyco_curs_execute): reverted change to rowcount
105
* psycopg/typecast_basic.c (typecast_BINARY_cast): reverted to
106
using strings instead of buffers when converting postgresql binary
107
objects (should *temporarily* fix corruption bug reported on
110
2004-07-21 Federico Di Gregorio <fog@debian.org>
112
* psycopg/cursor_type.c: removed __iter__ and next methods from
113
object methods and moved them where they do belong (tp_iter and
114
tp_iternext.) Bug reported by Daniele Varrazzo (again!)
116
2004-07-19 Federico Di Gregorio <fog@debian.org>
118
* psycopg/typecast_datetime.c (typecast_PYINTERVAL_cast): replaced
119
round() with micro() when rounding seconds (fixes bugs reported by
122
2004-07-16 Federico Di Gregorio <fog@debian.org>
124
* psycopg/pqpath.c (pq_set_critical): allow for a custom message
125
insted of the one from PQerrorMessage.
126
(pq_resolve_critical): added argument to specify if connection is
127
to be closed (used to not close it during COPY FROM/TO criticals.)
129
* psycopg/cursor_type.c (psyco_curs_fileno, psyco_curs_isready):
130
added extension methods related to async queries.
33
132
2004-07-15 Federico Di Gregorio <fog@debian.org>
35
* typemod.c (psyco_Binary): fixed two memory leaks in QuotedString
36
and Binary; many thanks to Stefan Schwarzer and valgrind.
136
* examples/tz.py: added example about time zones.
138
* psycopg/typecast_datetime.c (typecast_PYDATETIME_cast): create
139
FixedOffsetTimezone for postgresql "timestamp with time zone"
142
* lib/tz.py: added (even more than) needed tzinfo classes.
144
* psycopg/typecast.c (typecast_call): changed typecast call code
145
to take the additional cursor parameter, needed for
146
cursor-dependent type casting (tzinfo & friends.)
148
* psycopg/cursor_type.c (_psyco_curs_buildrow_with_factory): added
149
use of tuple factories to fetcXXX methods.
151
* lib/extras.py: little extra goodies for psycopg.
153
2004-07-14 Federico Di Gregorio <fog@debian.org>
157
* psycopg/connection_type.c: added .dsn attribute to connection
160
* psycopg/cursor_type.c (psyco_curs_mogrify): added .mogrify()
163
* psycopg/adapter_qstring.c: copy the connection encoding only if
164
wrapped object is unicode and added table of encodings.
38
166
2004-07-13 Federico Di Gregorio <fog@debian.org>
40
* cursor.c (_mogrify): move Dprintf some lines below to avoid
41
dereferencing zero pointer. Thanks to Manuele Rampazzo for
42
reporting it and Jason Erickson for the fix.
168
* psycopg/cursor_type.c (_mogrify): moved Dprintf statement to
169
avoid dereferencing empty pointer (from 1.1.x)
170
(psyco_curs_execute): now we save the query in self->query instead
171
of freeing the memory ASAP.
172
(cursorObject_members): and we finally export the saved query
173
through the cursor members interface. that's all folks.
175
* lib/extensions.py: added extensions module to clearly separate
176
psycopg own extensions from DBAPI-2.0
44
178
2004-07-10 Federico Di Gregorio <fog@debian.org>
46
* typeobj.c (psyco_INTERVAL_cast): argh, fixed typo in interval
49
2004-07-09 Federico Di Gregorio <fog@debian.org>
53
2004-07-04 Federico Di Gregorio <fog@debian.org>
57
* cursor.c (pgconn_notice_callback): if the message is an error,
58
set the right Python exception. (_psyco_curs_execute): if the
59
notice callback set an error during a COPY, now exit with NULL to
62
2004-07-01 Federico Di Gregorio <fog@debian.org>
66
* ZPsycopgDA/DA.py: added support for backend encodings.
68
* ZPsycopgDA/db.py (DB.query): added query_data to pass
69
arguments to the execute method; also added query string encoding.
71
* cursor.c: fixed DBAPI-2.0 compliance:
72
- psyco_curs_executemany: rowcount set to -1 because number of
73
affected columns can't be determined
74
- psyco_curs_setoutputsize: parse aguments
75
- _psyco_curs_execute: set rowcount to -1 for PGRES_COMMAND_OK
76
(INSERT or UPDATE executed)
78
* typeobj.c (psyco_INTERVAL_cast): fixed sign problem in interval
79
by directly checking last sign encountered instead of hours's.
81
* doc/examples/interval.py: added script to check for problem
82
reported by Marcin Engelmann.
84
2004-06-21 Federico Di Gregorio <fog@debian.org>
86
* configure.in: applied patch from Anthony Baxter to build on
89
2004-05-21 Federico Di Gregorio <fog@debian.org>
93
* ZPsycopgDA/DA.py (manage_addZPsycopgConnection): fixed bug
94
reported by Hiroyuki SHINDO (check and tilevel parameter inverted
180
* psycopg/typecast_datetime.c: ported interval fix from 1.1.x.
97
182
2004-05-16 Federico Di Gregorio <fog@debian.org>
184
* psycopg/typecast_datetime.c (typecast_*_cast): fixed Value error
185
when seconds > 59 by setting minutes += 1 and seconds -= 60
186
(reported by Marcel Gsteiger.)
101
188
2004-04-24 Federico Di Gregorio <fog@debian.org>
103
* typeobj.c (psyco_INTERVAL_cast): applied patch from Ross Cohen
104
to fix time intervals in range (00:00, -01:00).
190
* ported time interval patch by Ross Cohen from 1.1.12.
192
2004-04-19 Federico Di Gregorio <fog@debian.org>
194
* psycopg/typecast_datetime.c (typecast_PYDATE_cast): applied
195
patch from Jason Erickson: min and max taken from datetime.Date
198
2004-04-18 Federico Di Gregorio <fog@debian.org>
200
* Applied changes from Jason Erickson to build on win32; see his
201
(slightly edited) entry below. (Still builds on Linux :)
203
* psycopg/*.c: removed inclusion of pthread.h from all files
204
except psycopg/config.h to build on win32 without faking the file.
206
2004-04-15 Jason Erickson <jerickso@stickpeople.com>
208
* setup.py: Various changes. The critical ones:
209
- Make an empty pthread.h file so all the code doing an
210
#include <pthread.h> will find something.
211
- Appended the winsock2 library and the PostgreSQL library to
213
- Setup the include path.
214
- Have the PSYCOPG_VERSION macro be included with quotes.
216
* config.h: Added/Cleaned up Win32 includes, defines, stub functions.
218
* typecast.h: Removed ';' after PyObject_HEAD in the
219
typecastObject structure since Microsoft Visual Studio does not
222
2004-04-15 Federico Di Gregorio <fog@debian.org>
224
* Release 1.99.5 (bug-fixing and reorganization)
226
* setup.py et al.: moved psycopg to psycopg._psycopg to make
227
easier to provide high level python-only utilities (like the
228
promised pooling code). psycopg/__init__.py imports _psycopg and
229
make all the default DBAPI-2.0 stuff available.
106
231
2004-04-14 Federico Di Gregorio <fog@debian.org>
108
* cursor.c (psyco_curs_destroy): added slightly modified patch
109
from Ricardo Caesar Lenzi to reduce the number of opened
110
connections when cursors are closed.
112
2004-02-29 Federico Di Gregorio <fog@debian.org>
114
* cursor.c (alloc_keeper): PQprotocolVersion used in debug
115
statement only if available (postgresql version >= 7.4).
117
2004-02-23 Federico Di Gregorio <fog@debian.org>
119
* ZPsycopgDA/DA.py: small changes to make transaction level patch
120
compatible with old connection objects without the need to
123
2004-02-18 Federico Di Gregorio <fog@debian.org>
125
* connection.c (_curs_doall): removed some redundant code by
126
passing the right function pointer to _curs_doall (patch from
129
2004-02-17 Federico Di Gregorio <fog@debian.org>
131
* connection.c (_psyco_conn_set_isolation_level): bounds check on
132
the isolation level added (as suggested by David Gould.)
134
2004-02-12 Federico Di Gregorio <fog@debian.org>
136
* ZPsycopgDA: applied patch from Yury Don to added transaction
137
isolation level to ZPsycopgDA.
139
2004-01-17 Federico Di Gregorio <fog@debian.org>
141
* typeobj.c (psyco_TIME_cast): now we correctly use a
142
DateTimeDelta for postgresql times (as suggested by Daniele
145
* cursor.c (curs_switch_isolation_level): removed ALLOW_THREADS
146
macros to avoid deadlock while calling cursor() on the same
147
connection. Remember to redo the whole locking thing in psycopg 2.
149
2004-01-10 Federico Di Gregorio <fog@debian.org>
151
* module.c (psyco_connect): added "sslmode" parameter.
153
2004-01-08 Federico Di Gregorio <fog@debian.org>
155
* cursor.c (_mogrify): now raise the correct excetion instead of a
156
generic TypeError (bug reported by Mark McClain).
158
* psycopg.spec: added updated RPM spec file from Simon Willison.
160
* cursor.c (_mogrify): applied patch from Menno Smits to fix
161
mogrification of strings containing %%.
163
2003-12-21 Federico Di Gregorio <fog@debian.org>
165
* connection.c (_psyco_conn_set_isolation_level): applied patch
166
discussed with Sebastien Bigaret to avoid other threads to modify
167
the cursor list while switching isolation level. This should fix
168
the segfault reported some time ago.
170
2003-12-18 Federico Di Gregorio <fog@debian.org>
174
* cursor.c (_psyco_curs_execute): removed some cruft in COPY_IN,
175
"psyco_curs_reset(self, 0);" some 20 lines before already cleans
178
* cursor.c (COPY FROM implementation): plugged possible memory
179
leak reported by Paul Reznicek:
180
- in _psyco_curs_copy_from "o" was not DECREFfed when exiting
182
- in psyco_curs_copy_from PyObject_GetAttrString return a new
183
reference, substitued with PyObject_HasAttrString
185
2003-12-15 Federico Di Gregorio,,, <fog@localhost.localdomain>
187
* connection.c: moved some declaration before code to avoid
188
non-standard compilers to complain.
190
2003-12-12 Federico Di Gregorio <fog@debian.org>
192
* connection.c: applied patch from Sebastien Bigaret to make
193
commit and rollback methods raise an exception on database errors.
195
* ZPsycopgDA/db.py (DB.query): as per Geoff Davis suggestion,
196
changed string compare (note: we need a better way, maybe return
197
new numeric error code from protocol 3.0 in psycopg exception?)
199
2003-11-21 Federico Di Gregorio <fog@debian.org>
201
* cursor.c (_psyco_curs_execute): now use PQresultErrorField when
204
* VERSION: removed, it is now generated when running autoconf.
206
* module.h & co.: moved around a lot of #includes trying to get
207
rid of re-definition warnings. *this need testing* on all
210
2003-11-08 Federico Di Gregorio <fog@debian.org>
212
* Ehi, this is 1.1.10.
214
* cursor.c (_mogrify): removed memory leak by adding some DECREFs
215
(see also mail+patch from Chris Douty on psycopg mailing list.)
217
* ZPsycopgDA/DA.py: shortened list of compatible versions: nobody
218
should be using <1.1.7 anyway.)
220
2003-09-10 Federico Di Gregorio <fog@debian.org>
224
* Makefile.pre.in (dist): we now include the GeoTypes package in
225
psycopg distribution.
227
2003-09-08 Federico Di Gregorio <fog@debian.org>
229
* Makefile.pre.in: added PYTHONFRAMEWORK to fix MacOS X
232
2003-09-06 Federico Di Gregorio <fog@debian.org>
234
* cursor.c (_mogrify): sequences were mogrified wrong because of
235
index being initialized to -1. it is now initialized to 0 (thanks
238
2003-09-03 Federico Di Gregorio <fog@debian.org>
240
* cursor.c (_mogrify): no more problems when passing an empty
241
(without markers) format string.
243
2003-08-31 Federico Di Gregorio <fog@debian.org>
245
* cursor.c (_mogrify): fixed the sequence/dict problem by
246
completely rewriting the mogrification code.
248
2003-08-22 Federico Di Gregorio <fog@debian.org>
252
2003-08-19 Federico Di Gregorio <fog@debian.org>
254
* configure.in: added check for PQfreeNotify.
256
* cursor.c (psyco_curs_execute): added check on python version to
257
fix problem with python 2.3 PyMapping_Check() returning true while
258
checking list or sequences.
233
* psycopg/psycopgmodule.c (initpsycopg): wrapped initialization of
234
date/time adapters in #ifdefs to have psycopg compile without mx
237
2004-04-10 Federico Di Gregorio <fog@debian.org>
241
2004-04-09 Federico Di Gregorio <fog@debian.org>
243
* psycopg/typecast_builtins.c: changed DATE to not include
244
DATETIME types anymore.
246
* psycopg/adapter_datetime.c (pydatetime_str): switched from
247
strftime to isoformat to preserve fractional seconds.
249
2004-04-08 Federico Di Gregorio <fog@debian.org>
251
* psycopg/psycopgmodule.c (psyco_connect): ported sslmode
252
parameter from 1.1 branch.
254
* psycopg/adapter_datetime.*: added python built-in datetime
255
adapters. also added the datetime typecasters (still using mx as
258
* psycopg/typecast.h: removed aliases, they now live in the right
261
2004-03-08 Federico Di Gregorio <fog@debian.org>
263
* Release 1.99.3 (alpha 4).
265
* examples/lastrowid.py: and the .lastrowid example is in.
267
* psycopg/cursor_type.c (_mogrify): added call to .prepare()
268
method in both dict and sequence path.
270
* psycopg/connection_int.c (conn_set_client_encoding): added
271
encoding-change code.
273
* psycopg/adapter_qstring.c (qstring_quote): added hard-coded
274
support for utf8 and latin1 encodings.
276
2004-03-01 Federico Di Gregorio <fog@debian.org>
278
* psycopg/connection_int.c (conn_close): does not use libpq
279
functions on NULL pgconn (this can happen when conn_close is
280
called after a failed PQconnect.)
282
2004-02-29 Federico Di Gregorio <fog@debian.org>
284
* Release 1.99.2 (alpha 3).
286
* psycopg/cursor_type.c: added .rownumber and .connection
287
attributes. Also added .scroll(), .next() and .__iter__() methods
288
(see DBAPI2-.0 extensions on PEP.)
290
* psycopg/connection_type.c (psyco_conn_set_isolation_level):
291
added connection method .set_isolation_level(). Also added all
292
error objects to the connection (see DBAPI2-.0 extensions on PEP.)
294
* psycopg/connection_int.c (conn_switch_isolation_level): added
295
isolation level switching code.
297
* setup.py: removed all references to PSYCOPG_NEWSTYLE: support
298
for python < 2.2 has been dropped.
300
* typecast_basic.c (typecast_BINARY_cast): now binary objects are
301
returned as true buffers.
303
* adapter_binary.*: added adapter for buffers and binary (bytea)
306
* Release 1.99.1 (alpha 2).
308
* adapter_mxdatetime.*: added adapters for all mx.DateTime types.
310
2004-02-28 Federico Di Gregorio <fog@debian.org>
312
* cursor_type.c (_mogrify): complete rework of the mogrification
313
code to use the microprotocols_adapt function.
315
* typecast_basic.c (typecast_BOOLEAN_cast): we now return real
316
Py_True and Py_False values.
318
* microprotocols.h: added very simple microprotocols
319
implementation to allow for python->postgresql types registry.
321
2004-01-05 Federico Di Gregorio <fog@debian.org>
323
* connection_int.c (conn_commit/conn_rollback): added code to
324
commit/rollback and connection methods.
326
2004-01-04 Federico Di Gregorio <fog@debian.org>
328
* cursor_type.c (psyco_curs_fetchone): added fetchone method.
330
2004-01-03 Federico Di Gregorio <fog@debian.org>
332
* added (empty) INSTALL file.
334
* cursor_type.c (cursor_dealloc): added qattr for custom object
335
quoting using a callable attribute.
336
(_mogrify): ported new, fixed mogrification code from 1.1.12.
260
338
2003-08-01 Federico Di Gregorio <fog@debian.org>
264
* configure.in: patch from Vsevolod Lobko to find postgresql
265
headers under BSD ports.
267
* cursor.c (alloc_keeper): PQconnectdb is not thread safe, removed
268
Py_*_THREADS wrapper to fix problem reported by Vsevolod Lobko.
270
2003-07-31 Federico Di Gregorio <fog@debian.org>
272
* cursor.c (psyco_curs_execute): in python 2.3 *every* object
273
supports the mapping protocol breaking sequence mogrification:
274
problem fixed by checking first for sequences, then for
275
mappings. (psycopg really needs a regression tests suite!)
277
2003-07-26 Federico Di Gregorio <fog@debian.org>
281
* ZPsycopgDA/db.py: added _cursor method that checks for self.db
282
before returning a new cursor. Should fix problem reported with
285
2003-07-23 Federico Di Gregorio <fog@debian.org>
287
* cursor.c: applied notify and fileno patch from Vsevolod Lobko.
340
* cursor_type.c (_mogrify_sequence): added sequence mogrification,
341
can be done better, on the dict model.
343
2003-07-28 Federico Di Gregorio <fog@debian.org>
345
* typeobj_qstring.c: added quoted strings (can use both own code,
346
like psycopg 1.x or PQescapeString from lipq.)
348
2003-07-21 Federico Di Gregorio <fog@debian.org>
350
* connection_type.c (psyco_conn_close): added .close()
353
* cursor_*.c: added basic cursor interface (new-style.)
289
355
2003-07-20 Federico Di Gregorio <fog@debian.org>
291
* cursor.c (_mogrify_dict): applied (slightly modofied) patch from
292
Tobias Sargeant: now .execute() accept not only dictionaries but
293
every type that has a __getitem__ method.
295
2003-07-13 Federico Di Gregorio <fog@debian.org>
299
* cursor.c (psyco_curs_scroll): added scroll method, patch from
302
* typemod.c (new_psyco_quotedstringobject): discard NUL characters
303
(\0) in quoted strings (fix problem reported by Richard Taylor.)
305
2003-07-10 Federico Di Gregorio <fog@debian.org>
307
* Added python-taylor.txt in doc directory: very nice introduction
308
to DBAPI programming by Richard Taylor.
310
2003-07-09 Federico Di Gregorio <fog@debian.org>
312
* cursor.c (_psyco_curs_execute): another MT problem exposed and
313
fixed by Sebastien Bigaret (self->keeper->status still LOCKED
314
after a fatal error during PQexec call.)
316
2003-06-23 Federico Di Gregorio <fog@debian.org>
320
* ZPsycopgDA/db.py (DB.query): stupid error making ZPsycopgDA
321
unusable fixed (else->except).
323
2003-06-22 Federico Di Gregorio <fog@debian.org>
325
* Release 1.1.5 candidate.
327
* cursor.c (psyco_curs_copy_to): now any object with the write
328
method can be used as a copy_to target.
330
2003-06-20 Federico Di Gregorio <fog@debian.org>
332
* cursor.c (psyco_curs_copy_from): applied patch to allow copy_to
333
from any object having a "readline" attribute (patch from Lex
334
Berezhny.) (psyco_curs_copy_from): another patch from Lex to make
335
psycopg raise an error on COPY FROM errors.
337
* ZPsycopgDA/db.py (DB.query): if a query raise an exception,
338
first self._abort() is called to rollback current
339
"sub-transaction". this is a backward-compatible change for
340
people that think continuing to work in the same zope transaction
341
after an exception is a Good Thing (TM).
343
* finally updated check_types.expected. checked by hand the
344
conversions work the right way.
346
* doc/examples/work.py: fixed example. note that it is a long time
347
(at least two releases) that psycopg does not END a transaction
348
initiated explicitly by the user while in autocommit mode.
350
2003-06-19 Federico Di Gregorio <fog@debian.org>
352
* cursor.c (_mogrify_dict): fixed dictionary mogrification (patch
353
by Vsevolod Lobko.) (_psyco_curs_execute): fixed keeper status
354
trashing problem by letting only one thread at time play with
355
keeper->status (as suggested by Sebastien Bigaret.)
357
2003-05-07 Federico Di Gregorio <fog@debian.org>
361
* cursor.c: Added "statusmessage" attribute that holds the backend
362
message (modified lots of functions, look for self->status).
364
2003-05-06 Federico Di Gregorio <fog@debian.org>
366
* typemod.c (new_psyco_datetimeobject): moved Py_INCREF into
367
XXX_FromMx functions, to fix memory leak reported by Jim Crumpler.
369
2003-04-11 Federico Di Gregorio <fog@debian.org>
371
* module.h (PyObject_TypeCheck): fixed leak in python 2.1
374
2003-04-08 Federico Di Gregorio <fog@debian.org>
376
* buildtypes.py (basic_types): removed LXTEXT (never user, does
379
2003-04-07 Federico Di Gregorio <fog@debian.org>
381
* setup.py: added very lame setup.py script.
383
2003-04-02 Federico Di Gregorio <fog@debian.org>
387
* psycopg.spec: Added (but modified) spec file by William
388
K. Volkman (again, this change was lost somewhere in time...)
390
2003-04-01 Federico Di Gregorio <fog@debian.org>
392
* cursor.c (_psyco_curs_execute): psycopg was reporting everything
393
as IntegrityError; reported and fix suggested by Amin Abdulghani.
395
2003-03-21 Federico Di Gregorio <fog@debian.org>
397
* cursor.c (psyco_curs_fetchone): debug statements sometimes made
398
psycopg segfault: fixed by a patch by Ken Simpson.
400
2003-03-18 Federico Di Gregorio <fog@debian.org>
402
* cursor.c (alloc_keeper): patch from Dieter Maurer to unlock GIL
403
whaile calling PQconnectdb().
405
2003-03-05 Federico Di Gregorio <fog@debian.org>
409
* Applied cygwin patch from Hajime Nakagami.
411
2003-02-25 Federico Di Gregorio <fog@debian.org>
415
* cursor.c: added .lastrowid attribute to cursors (lastoid is
416
deprecated and will be removed sometime in the future.)
418
* cursor.c (begin_pgconn): implemented various isolation levels
419
(also, in abort_pgconn, commit_pgconn.)
421
* Added keyword parameters to psycopg.connect(): all take strings
422
(even port): database, host, port, user, password.
424
* configure.in: fixed test for postgres version > 7.2.
426
* cursor.c (_psyco_curs_execute): removed if on pgerr in default
427
case (if we enter default pgerr can't be one of the cased ones.)
428
Also applied slightly modified patch from William K. Volkman.
430
2003-02-24 Federico Di Gregorio <fog@debian.org>
432
* Merged in changes from 1.0.15.1 (see below for merged
435
2003-02-14 Federico Di Gregorio <fog@debian.org>
439
* cursor.c (_mogrify_fmt): in some cases we where removing one
440
character too much from the format string, resulting in BIG BAD
443
2003-02-13 Federico Di Gregorio <fog@debian.org>
445
* Release 1.0.15. <g>
447
* connection.c (_psyco_conn_close): now call dispose_pgconn on all
448
cursors, to make sure all phisical connections to the db are
449
closed (problem first reported by Amin Abdulghani.)
451
* DBAPI-2.0 fixed mainly due to Stuart Bishop:
452
- cursor.c (psyco_curs_setinputsizes): removed PARSEARGS, as
453
this method does nothing.
454
- cursor.c (psyco_curs_setoutputsize): .setoutputsize was
455
spelled .setoutputsizes! fixed. Also removed PARSEARGS, as this
458
2003-02-12 Federico Di Gregorio <fog@debian.org>
460
* module.h (Dprintf): check on __APPLE__ to avoid variadic macros
461
on macos x (as reported by Stuart Bishop, btw, why gcc seems to
462
not support them on macos?)
464
* cursor.c (_mogrify_fmt): non-alphabetic characters are dropped
465
after the closing ")" until a real alphabetic, formatting one is
466
found. (Fix bug reported by Randall Randall.)
468
2003-02-05 Federico Di Gregorio <fog@debian.org>
470
* typeobj.c (psyco_INTERVAL_cast): patched again to take into
471
account leading zeroes.
473
2003-02-02 Federico Di Gregorio <fog@debian.org>
475
* Makefile.pre.in: applied patch from Albert Chin-A-Young to
478
* README: added explicit permission to link with OpenSSL.
480
2003-01-30 Federico Di Gregorio <fog@debian.org>
482
* config.h.in: applied patch from Albert Chin-A-Young to fix
485
2003-01-29 Federico Di Gregorio <fog@debian.org>
487
* cursor.c (_mogrify_seq): fixed little refcount leak, as
488
suggested by Yves Bastide.
490
2003-01-24 Federico Di Gregorio <fog@debian.org>
492
* Merged-in changes from 1.0.14.2 (emacs diff mode is great..)
496
* ZPsycopgDA/db.py (DB.query): back to allowing up to 1000 db
497
errors before trying to reopen the connection by ourselves.
499
* ZPsycopgDA/db.py: a false (None preferred, 0 allowed) max_rows
500
value now means "fetch all results".
502
2003-01-22 Federico Di Gregorio <fog@debian.org>
504
* cursor.c (psyco_curs_fetchone): fixed little memory leak
505
reported by Dieter Maurer.
507
2003-01-20 Federico Di Gregorio <fog@debian.org>
509
* ZPsycopgDA/db.py (DB.tables/columns): added registration with
510
Zope's transaction machinery.
514
* ZPsycopgDA/db.py: applied some fixes and cleanups by Dieter
515
Maurer (serialization problem were no more correctly detected!)
521
* Import of 1.1.1 done.
523
* Moved everything to cvs HEAD.
525
2003-01-20 Federico Di Gregorio <fog@debian.org>
527
* ZPsycopgDA/connectionAdd.dtml: fixed typo (thanks to Andrew
530
* typeobj.c (psyco_INTERVAL_cast): applied patch from Karl Putland
531
to fix problems with fractional seconds.
533
2002-12-03 Federico Di Gregorio <fog@debian.org>
535
* Release 1.0.14-pre2.
537
* module.h: added macro for PyObject_TypeCheck if python version <2.2.
539
* typeobj.c (psyco_DBAPITypeObject_coerce): added error message to
542
2002-12-02 Federico Di Gregorio <fog@debian.org>
544
* Release 1.0.14-pre1.
546
* ZPsycopgDA/db.py (DB.sortKey): added sortKey().
548
* ZPsycopgDA/DA.py: applied a patch that was lost on hard disk
549
(sic), if you sent me a patch names psycopg-1.0.13.diff modifying
550
DA.py imports and want your name here, send me an email. :)
551
[btw, the patch fix the ImageFile import, getting it from Globals
554
* typeobj.c (psyco_DBAPITypeObject_coerce): Fixed coerce segfault
555
by checking explicitly for all the allowed types.
557
2002-11-25 Federico Di Gregorio <fog@debian.org>
559
* doc/examples/*.py: added .rollback() to all exceptions before
560
deleteing the old table.
562
* cursor.c: Apllied patch from John Goerzen (fix memory leak in
565
2002-10-25 Federico Di Gregorio <fog@debian.org>
569
* connection.c (_psyco_conn_close): remove cursors from the list
570
starting from last and moving backward (as suggested by Jeremy
571
Hylton; this is not such a big gain because python lists are
572
*linked* lists, but not removing the element 0 makes the code a
575
* cursor.c (_psyco_curs_execute): now IntegrityError is raised
576
instead of ProgrammingError when adding NULL values to a non-NULL
577
column (suggested by Edmund Lian) and on referential integrity
578
violation (as per debian bug #165791.)
580
* typeobj.c (psyco_DATE_cast): now we use 999999 instead of
581
5867440 for very large (both signs) dates. This allow to re-insert
582
the DateTime object into postgresql (suggested by Zahid Malik.)
584
2002-09-13 Federico Di Gregorio <fog@debian.org>
588
* Removed code to support COPY FROM/TO, will be added to new 1.1
589
branch to be released next week.
591
* cursor.c (_mogrify_seq): Fixed memory leak reported by Menno
592
Smits (values obtained by calling PySequence_GetItem are *new*
595
2002-09-07 Federico Di Gregorio <fog@debian.org>
597
* cursor.c (_psyco_curs_execute): Added skeleton to support COPY
600
2002-09-06 Federico Di Gregorio <fog@debian.org>
602
* configure.in: if libcrypt can't be found we probably are on
603
MacOS X: check for libcrypto, as suggested by Aparajita Fishman.
605
2002-09-03 Federico Di Gregorio <fog@debian.org>
607
* ZPsycopgDA/db.py (DB.columns): Applied patch from Dieter Maurer
608
to allow the DA-browser to work with mixed case table names.
610
2002-08-30 Federico Di Gregorio <fog@debian.org>
612
* ZPsycopgDA/DA.py (cast_DateTime): Applied patch from Yury to fix
613
timestamps (before they were returned with time always set to 0.)
615
2002-08-26 Federico Di Gregorio <fog@debian.org>
617
* Release 1.0.11.1 (to fix a %&�$"! bug in ZPsycopgDA not
618
accepting psycopg 1.0.11 as a valid version.
622
2002-08-22 Federico Di Gregorio <fog@debian.org>
624
* Release 1.0.11pre2.
626
* cursor.c (_psyco_curs_execute): fixed IntegrityError as reported
627
by Andy Dustman. (psyco_curs_execute): converting TypeError to
628
ProgrammingError on wrong number of % and/or aeguments.
630
* doc/examples/integrity.py: added example and check for
633
2002-08-08 Federico Di Gregorio <fog@debian.org>
635
* Release 1.0.11pre1.
637
2002-08-06 Federico Di Gregorio <fog@debian.org>
639
* ZPsycopgDA/DA.py (cast_DateTime): patched as suggested by Tom
640
Jenkins; now it shouldwork with time zones too.
642
2002-08-01 Federico Di Gregorio <fog@debian.org>
644
* ZPsycopgDA/DA.py (cast_DateTime): fixed problem with missing
645
AM/PM, as reported by Tom Jenkins.
647
2002-07-23 Federico Di Gregorio <fog@debian.org>
649
* Fixed buglets reported by Mike Coleman.
651
2002-07-22 Federico Di Gregorio <fog@debian.org>
655
2002-07-14 Federico Di Gregorio <fog@debian.org>
657
* Release 1.0.10pre2.
659
* typeobj.c (psyco_LONGINTEGER_cast): fixed bad segfault by
660
INCREFfing Py_None when it is the result of a NULL conversion.
662
2002-07-04 Federico Di Gregorio <fog@debian.org>
664
* Release 1.0.10pre1.
666
* buildtypes.py (basic_types): added TIMESTAMPTZ to the types
667
converted by the DATE builtin.
669
* ZPsycopgDA/DA.py (Connection.connect): Added version check.
671
2002-07-03 Federico Di Gregorio <fog@debian.org>
673
* typeobj.c (psyco_XXX_cast): fixed bug reported by multiple users
674
by appliying Matt patch.
676
2002-06-30 Federico Di Gregorio <fog@debian.org>
678
* ZPsycopgDA/DA.py (Connection.set_type_casts): applied patch from
679
Tom Jenkins to parse dates with TZ.
681
2002-06-20 Federico Di Gregorio <fog@debian.org>
683
* Preparing for release 1.0.9.
685
* Makefile.pre.in (dist): now we really include psycopg.spec.
687
2002-06-17 Federico Di Gregorio <fog@debian.org>
689
* ZPsycopgDA/db.py (_finish, _abort): fixed problem with
690
connection left in invalid state by applying Tom Jenkins patch.
692
2002-06-06 Federico Di Gregorio <fog@debian.org>
694
* ZPsycopgDA/db.py (DB._abort): fixed exception raising after an
695
error in execute triggerer deletion of self.db.
697
2002-05-16 Federico Di Gregorio <fog@debian.org>
699
* cursor.c (psyco_curs_fetchone): None values passed to the
700
internal typecasters.
702
* typeobj.c: added management of None to all the builtin
705
2002-04-29 Federico Di Gregorio <fog@debian.org>
707
* ZPsycopgDA/DA.py (cast_Time): applied 'seconds as a float' patch
710
2002-04-23 Federico Di Gregorio <fog@debian.org>
714
* Makefile.pre.in: we now include win32 related files in the
717
* connection.c (psyco_conn_destroy): fixed segfault reported by
718
Scott Leerssen (we were double calling _psyco_conn_close().)
720
* typemod.c (new_psyco_quotedstringobject): fixed memory stomping
721
catched by assert(); thanks to Matt Hoskins for reporting this
724
2002-04-22 Federico Di Gregorio <fog@debian.org>
726
* configure.in: grmpf. we need a VERSION file for windows, we'll
727
use it for configue and debian/rules too.
729
* Integrated win32 changes from Jason Erickson. Moved his
730
Readme.txt to README.win32, removed VERSION and DATE, patched
731
source where required. Renamed HISTORY to ChangeLog.win32, hoping
732
Jason will start adding changes to the real ChangeLog file.
734
2002-04-07 Federico Di Gregorio <fog@debian.org>
738
* configure.in: fixed little bug as reported by ron.
740
2002-04-05 Federico Di Gregorio <fog@debian.org>
744
* typemod.c (new_psyco_bufferobject): fixed encoding problem (0xff
745
now encoded as \377 and not \777.) Also encoding *all* chars as
746
quoted octal values to prevent "Invalid UNICODE character sequence
749
* Release 1.0.7. (Real this time.) (Ok, it was a joke....)
751
2002-04-03 Federico Di Gregorio <fog@debian.org>
753
* configure.in: fixed problem with postgres versions in the format
756
* connection.c (psyco_conn_destroy): moved most of the destroy
757
stuff into its own function (_psyco_conn_close) and added a call
758
to it from psyco_conn_close. This should fix the "psycopg does not
759
release postgres connections on .close()" problem.
761
2002-03-29 Federico Di Gregorio <fog@debian.org>
763
* Release 1.0.7. Delayed.
765
* buildtypes.py (basic_types): added TIMESTAMPTZ postgres type to
766
the list of valid DATETIME types (incredible luck, no changes to
767
the parse are needed!)
769
* typeobj.c (psyco_DATE_cast): fixed wrong managment of sign in
772
2002-03-27 Federico Di Gregorio <fog@debian.org>
774
* configure.in (INSTALLOPTS): added AC_PROG_CPP test, now uses
775
AC_TRY_CPP to test for _all_ required mx includes.
777
2002-03-19 Federico Di Gregorio <fog@debian.org>
779
* configure.in: added check for both pg_config.h and config.h to
780
detect postgres version.
782
* cursor.c: now None values are correctly handled when the format
783
string is not %s but %d, etc.
785
2002-03-08 Federico Di Gregorio <fog@debian.org>
787
* ZPsycopgDA/DA.py: added MessageDialog import suggested by
790
2002-03-07 Federico Di Gregorio <fog@debian.org>
792
* psycopg.spec: added RPM specs by William K. Volkman.
796
* configure.in: imported changes to allow postgres 7.2 builds from
799
2002-03-04 Federico Di Gregorio <fog@debian.org>
803
* applied table browser patch from Andy Dustman.
805
2002-02-26 Federico Di Gregorio <fog@debian.org>
807
* typeobj.c (psyco_DATE_cast): added management of infinity
808
values, this can be done in a better way, by accessing the
809
MaxDateTime and MinDateTime constants of the mx.DateTime module.
811
2002-02-20 Federico Di Gregorio <fog@debian.org>
813
* configure.in: Release 1.0.4.
815
2002-02-12 Federico Di Gregorio <fog@debian.org>
817
* ZPsycopgDA/db.py (DB.columns): fixed select to reenable column
818
expansion in table browsing.
820
* ZPsycopgDA/__init__.py: removed code that made psycopg think
823
2002-02-11 Federico Di Gregorio <fog@debian.org>
825
* cursor.c (_mogrify_dict): removed Py_DECREF of Py_None,
826
references returned by PyDict_Next() are borrowed (thanks to
827
Michael Lausch for this one.)
829
2002-02-08 Federico Di Gregorio <fog@debian.org>
831
* A little bug slipped in ZPsycopgDA, releasing 1.0.3 immediately.
835
* tests/check_types.py (TYPES): added check for hundredths of a
838
2002-02-07 Federico Di Gregorio <fog@debian.org>
840
* typeobj.c (psyco_INTERVAL_cast): patched to correct wrong
841
interpretation of hundredths of a second (patch from
842
A. R. Beresford, kudos!)
844
2002-01-31 Federico Di Gregorio <fog@debian.org>
848
2002-01-16 Federico Di Gregorio <fog@debian.org>
850
* Preparing for release 1.0.1.
852
* cursor.c (alloc_keeper): removed ALLOW_THREADS wrapper around
853
PQconnectdb: libpq calls crypt() that is *not* reentrant.
855
2001-12-19 Federico Di Gregorio <fog@debian.org>
857
* typeobj.c (psyco_DBAPITypeObject_cmp): added check to simply
858
return false when two type objects are compared (type objects are
859
meaned to be compared to integers!)
861
* typeobj.c: fixed the memory leak reported by the guys at
862
racemi, for real this time. (added about 5 DECREFS and 2 INCREFS,
865
2001-12-17 Federico Di Gregorio <fog@debian.org>
867
* typeobj.c (psyco_DBAPITypeObject_cmp): fixed memory leak by
868
using PyTuple_GET_ITEM (we are sure the tuple has at least one
869
element, we built it, after all...) (many thanks to Scott Leerssen
870
for reporting the *exact line* for this one.)
872
2001-12-13 Federico Di Gregorio <fog@debian.org>
874
* cursor.c: fixed memory leak due to extra strdup (thanks
875
to Leonardo Rochael Almeida.)
877
2001-11-14 Federico Di Gregorio <fog@debian.org>
881
* doc/README: added explanation about guide work in progess but
884
* debian/*: lots of changes to release 1.0 in debian too.
886
2001-11-12 Federico Di Gregorio <fog@debian.org>
888
* RELEASE-1.0: added release file, to celebrate 1.0.
890
* tests/zope/typecheck.zexp: regression test on types for zope.
892
2001-11-11 Federico Di Gregorio <fog@debian.org>
894
* ZPsycopgDA/DA.py (cast_Interval): removed typecast of interval
895
into zope DateTime. intervals are reported as strings when using
896
zope DateTime and as DateTimeDeltas when using mx.
898
2001-11-09 Federico Di Gregorio <fog@debian.org>
900
* typeobj.c (psyco_INTERVAL_cast): complete rewrite of the
901
interval parsing code. now we don't use sscanf anymore and all is
902
done with custom code in a very tight and fast loop.
904
2001-11-08 Federico Di Gregorio <fog@debian.org>
906
* ZPsycopgDA/DA.py (Connection.set_type_casts): added mx INTERVAL
909
* ZPsycopgDA/db.py (DB.query): now we return column names even if
910
there are no rows in the result set. also, cleaned up a little bit
913
2001-11-7 Federico Di Gregorio, <fog@debian.org>
915
* Makefile.pre.in: fixed small problem with zcat on True64
918
2001-11-06 Federico Di Gregorio <fog@debian.org>
920
* ZPsycopgDA/db.py (DB.query): added fix for concurrent update
923
2001-11-05 Federico Di Gregorio <fog@debian.org>
925
* cursor.c: now we include postgres.h if InvalidOid is still
926
undefined after all other #includes.
928
* README: clarified use of configure args related to python
931
* aclocal.m4: patched to work with symlinks installations (thanks
934
* cursor.c (_psyco_curs_execute): now reset the keeper's status to
935
the old value and not to BEGIN (solve problem with autocommit not
938
2001-11-01 Federico Di Gregorio <fog@debian.org>
940
* doc/examples/dt.py: added example on how to use the date and
943
* Makefile.pre.in (dist-zope): removed dependencies on GNU install
944
and tar commands. Also a little general cleanup on various targets.
946
* ZPsycopgDA/DA.py: fixed mx.DateTime importing.
948
2001-10-31 Federico Di Gregorio <fog@debian.org>
950
* typemod.c (psyco_xxxFromMx): fixed bug in argument parsing (we
951
weren't usigng the right type object.)
953
* aclocal.m4: now builds OPT and LDFLAGS on the values of the env
954
variables instead of overwriting them.
956
* Makefile.pre.in (CFLAGS): removed -Wall, you can add it back at
957
compile time with OPT="-Wall" ./configure ...
959
* Setup.in (OPT): removed -Wall.
961
2001-10-30 Michele Comitini <mcm@initd.net>
963
* module.h: ANSI C compatibility patch from Daniel Plagge.
965
2001-10-30 Federico Di Gregorio <fog@debian.org>
967
* README: added common building problems and solutions.
969
* configure.in: removed check for install command, already done by
970
james's aclocal.m4 for python. removed install-sh. removed -s from
973
2001-10-29 Federico Di Gregorio <fog@debian.org>
975
* Makefile.pre.in (dist): removed examples/ directory from
978
* merge with cvs head. preparing to fork again on PSYCOPG-1-0 (i
979
admit BRANCH_1_0 was quite a silly name.)
981
* doc/examples/usercast.py: now works.
983
* connection.c (curs_rollbackall): fixed little bug (exposed by
984
the deadlock below) by changing KEEPER_READY to KEEPER_READY.
986
* doc/examples/commit.py: deadlock problem solved, was the
987
example script, _not_ psycopg. pew... :)
989
* examples/*: removed the examples moved to doc/examples/.
991
* doc/examples/commit.py,dictfetch.py: moved from examples/ and
992
changed to work for 1.0. unfortunately commit.py locks psycopg!!!
994
2001-10-24 Federico Di Gregorio <fog@debian.org>
996
* modified all files neede for the 1.0 release.
998
* configure.in (MXFLAGS): removed electric fence support.
1000
* Makefile.pre.in (dist): now we remove CVS working files before
1001
packing the tarball.
1003
* tests: files in this directory are not coding examples, but
1004
regression tests. we need a sufficient number of tests to follow
1005
every single code path in psycopg at least once. first test is
1008
* doc/examples: moved new example code to examples directory, old
1009
tests and code samples will stay in examples/ until the manual will
1012
2001-10-16 Federico Di Gregorio <fog@debian.org>
1014
* typeobj.c (psyco_INTERVAL_cast): completely revised interval
1015
casting code. (psyco_TIME_cast): we use the unix epoch when the
1018
* cursor.c (psyco_curs_executemany): modified sanity check to
1019
accept sequences of tuples too and not just dictionaries.
1021
2001-10-15 Federico Di Gregorio <fog@debian.org>
1023
* typeobj.c (psyco_INTERVAL_cast): fixed bug caused by wrong
1024
parsing on '1 day' (no hours, minutes and seconds.)
1026
2001-10-15 Michele Comitini <mcm@initd.net>
1028
* cursor.c (_execute): use the correct cast functions even on
1029
retrival of binary cursors.
1031
2001-10-12 Federico Di Gregorio <fog@debian.org>
1033
* typemod.c (new_psyco_bufferobject): space not quoted anymore,
1034
smarter formula to calculate realloc size.
1036
* cursor.c (psyco_curs_fetchone): removed static tuple (using
1037
static variable in multithreaded code is *crazy*, why did i do it?
1040
* typeobj.c (psyco_init_types): exports the binary converter (will
1041
be used in cursor.c:_execute.)
1043
* typeobj.h: added export of psyco_binary_cast object.
1045
2001-10-05 Federico Di Gregorio <fog@debian.org>
1047
* cursor.c (_psyco_curs_execute): added missing Py_XDECREF on
1050
* Makefile.pre.in (dist): added install-sh file to the
1053
* replaced PyMem_DEL with PyObject_Del where necessary.
1055
* connection.c (psyco_conn_destroy): added missing
1056
pthread_mutex_destroy on keeper lock.
1058
2001-10-01 Michele Comitini <mcm@initd.net>
1060
* typemod.c(new_psyco_bufferobject()): using unsigned char for
1061
binary objects to avoid too many chars escaped. A quick and
1062
simple formula to avoid memory wasting and too much reallocating
1063
for the converted object. Needs _testing_, but it is faster.
1065
* cursor.c: #include <postgres.h>
1067
* module.h: now debugging should be active only when asked by
1068
./configure --enable-devel
1070
2001-09-29 Federico Di Gregorio <fog@debian.org>
1072
* cursor.c (new_psyco_cursobject): added locking of connection,
1073
still unsure if necessary.
1075
2001-09-26 Federico Di Gregorio <fog@debian.org>
1077
* configure.in: changed DEBUG into PSYCOTIC_DEBUG, to allow other
1078
includes (postgres.h) to use the former. better compiler checks:
1079
inline, ansi, gcc specific extensions. removed MXMODULE: we don't
1082
* general #include cleanup, should compile on MacOS X too.
1084
* typeobj.c (psyco_DATE_cast): uses sscanf. should be faster too.
1085
(psyco_TIME_cast): dixit.
1087
* applied patch from Daniel Plagge (SUN cc changes.)
1089
2001-09-22 Federico Di Gregorio <fog@debian.org>
1091
* ZPsycopgDA/db.py (DB._finish, DB._begin): fix for the
1092
self.db == None problem.
1094
2001-09-19 Michele Comitini <mcm@initd.net>
1096
* typemod.c (new_psyco_bufferobject): better memory managment
1097
(now it allocates only needed space dinamically).
1099
* typeobj.c (psyco_BINARY_cast): ripped a useless check, now
1100
it assumes that binary streams come out from the db correctly
1101
escaped. Should be a lot faster.
1103
2001-09-18 Federico Di Gregorio <fog@debian.org>
1105
* typeobj.c (psyco_INTERVAL_cast): fixed interval conversion
1106
(hours were incorrectly converted into seconds.)
1108
2001-09-17 Federico Di Gregorio <fog@debian.org>
1110
* cursor.c (_mogrify_seq, _mogrify_dict): added check for None
1111
value and conversion of None -> NULL (fixes bug reported by Hamish
1114
2001-09-12 Federico Di Gregorio <fog@debian.org>
1116
* module.c: added handles to new date and time conversion
1117
functions (see below.)
1119
* typemod.c (psyco_XXXFromMx): added conversion functions that
1120
simply wrap the mxDateTime objects instead of creating
1121
them. DBAPI-2.0 extension, off-curse.
1123
2001-09-10 Federico Di Gregorio <fog@debian.org>
1125
* buildtypes.py: solved hidden bug by changing from dictionary to
1126
list, to maintain ordering of types. sometimes (and just
1127
sometimes) the type definitions were printed unsorted, resulting
1128
is psycopg initializing the type system using the type objects in
1129
the wrong order. you were getting float values from an int4
1130
column? be happy, this is now fixed...
1132
* cursor.c (psyco_curs_lastoid): added method to get oid of the
1133
last inserted row (it was sooo easy, it even works...)
1135
2001-09-08 Federico Di Gregorio <fog@debian.org>
1137
* typeobj.c (psyco_INTERVAL_cast): added casting function for the
1138
postgres INTERVAL and TINTERVAL types (create a DateTimeDelta
1141
2001-09-05 Federico Di Gregorio <fog@debian.org>
1143
* cursor.c: moved all calls to begin_pgconn to a single call in
1144
_psyco_curs_execute, to leave the connection in a not-idle status
1145
after a commit or a rollback. this should free a lot of resources
1146
on the backend side. kudos to the webware-discuss mailing list
1147
members and to Clark C. Evans who suggested a nice solution.
1149
* connection.c (curs_rollbackall, curs_commitall): removed calls
1150
to begin_pgconn, see above.
1152
* module.c (initpsycopg): cleaned up mxDateTime importing; we now
1153
use the right function from mxDateTime.h. Is not necessary anymore
1154
to include our own mx headers. This makes psycopg to depend on
1155
mxDateTime >= 2.0.0.
1157
2001-09-04 Federico Di Gregorio <fog@debian.org>
1159
* doc/*.tex: added documentation directory and skeleton of the
1162
2001-09-03 Federico Di Gregorio <fog@debian.org>
1164
* merged in changes from HEAD (mostly mcm fixes to binary
1167
* preparing for release 0.99.6.
1169
2001-09-03 Michele Comitini <mcm@initd.net>
1171
* typemod.c: much faster Binary encoding routine.
1173
* typeobj.c: much faster Binary decoding routine.
1175
2001-08-28 Michele Comitini <mcm@initd.net>
1177
* typemod.c: Working binary object to feed data to bytea type
1180
* typeobj.c: Added BINARY typecast to extract data from
1183
* cursor.c: Added handling for SQL binary cursors.
1185
2001-08-3 Michele Comitini <mcm@initd.net>
1187
* cursor.c: fixed DATESTYLE problem thanx to Steve Drees.
1189
2001-07-26 Federico Di Gregorio <fog@debian.org>
1191
* Makefile.pre.in: applied change suggested by Stefan H. Holek to
1192
clobber and distclean targets.
1194
2001-07-23 Federico Di Gregorio <fog@debian.org>
1196
* ZPsycopgDA/db.py: fixed little bugs exposed by multiple select
1197
changes, not we correctly import ListType and we don't override
1198
the type() function with a variable.
1200
2001-07-17 Federico Di Gregorio <fog@debian.org>
1202
* configure.in: Release 0.99.5.
1204
2001-07-12 Federico Di Gregorio <fog@debian.org>
1206
* debian/* fixed some little packaging problems.
1208
2001-07-11 Federico Di Gregorio <fog@debian.org>
1210
* cursor.c, typeobj.c: removed some Py_INCREF on PyDict_SetItem
1211
keys and values to avoid memory leaks.
1213
2001-07-03 Federico Di Gregorio <fog@debian.org>
1215
* cursor.c (_mogrify_dict): added dictionary mogrification: all
1216
Strings in the dictionary are translated into QuotedStrings. it
1217
even works... (_mogrify_seq): added sequence mogrification and
1218
code to automagically mogrify all strings passed to .execute().
1220
2001-07-02 Federico Di Gregorio <fog@debian.org>
1224
* typemod.c: added QuotedString class and methods.
1226
* module.c: added QuotedString method to module psycopg.
1228
* typemod.c: changed Binary objects into something usefull. now
1229
the buffer object quotes the input by translatin every char into
1230
its octal representation. this consumes 4x memory but guarantees
1231
that even binary data containing '\0' can go into the Binary
1234
* typemod.h: added definition of QuotedString object.
1236
2001-06-28 Federico Di Gregorio <fog@debian.org>
1238
* ZPsycopgDA/db.py, ZPsycopgDA/DABase.py: applied patch sent by
1239
yury to fix little buglet.
1241
2001-06-22 Federico Di Gregorio <fog@debian.org>
1245
* connection.c (new_psyco_connobject): now we strdup dsn, as a fix
1246
for the problem reported by Jack Moffitt.
1248
* Ok, this will be the stable branch from now on...
1250
* Merged in stuff from 0.99.3. About to re-branch with a better
1253
2001-06-20 Federico Di Gregorio <fog@debian.org>
1255
* Release 0.99.3. Showstoppers for 1.0 are:
1257
- mxDateTime module loading
1258
- bug reported by Yury.
1260
* Integrated patches from Michele:
1261
- searching for libcrypt in configure now works
1262
- removed memory leak in asprintf.c
1264
2001-06-15 Federico Di Gregorio <fog@debian.org>
1266
* ZPsycopgDA/__init__.py (initialize): applied patch from Jelle to
1267
resolve problem with Zope 2.4.0a1.
1269
2001-06-14 Federico Di Gregorio <fog@debian.org>
1271
* configure.in: added code to check for missing functions (only
1274
* asprintf.c: added compatibility code for oses that does not have
1275
the asprintf() function.
1277
2001-06-10 Federico Di Gregorio <fog@debian.org>
1279
* Branched PSYCOPG_0_99_3. Development will continue on the cvs
1280
HEAD, final adjustements and bugfixing should go to this newly
1283
2001-06-08 Michele Comitini <mcm@initd.net>
1285
* ZPsycopgDA/DA.py: DateTime casts simplified and corrected
1286
as suggested by Yury.
1288
2001-06-05 Federico Di Gregorio <fog@debian.org>
1292
* Makefile.pre.in (dist): added typemod.h and typemod.c to
1295
* cursor.c (commit_pgconn, abort_pgconn, begin_pgconn): resolved
1296
segfault reported by Andre by changing PyErr_SetString invokations
1297
into pgconn_set_critical. the problem was that the python
1298
interpreter simply segfaults when we touch its internal data (like
1299
exception message) inside an ALLOW_THREADS wrapper.
1301
* now that we are 100% DBAPI-2.0 compliant is time for the
1302
one-dot-o release (at last!) Para-pa-pa! This one is tagged
1303
PSYCOPG_0_99_1 but you can call it 1.0pre1, if you better like.
1304
(A very long text just to say 'Release 0.99.1')
1306
* typemod.[ch]: to reach complete DBAPI-2.0 compliance we
1307
introduce some new objects returned by the constructors Date(),
1308
Time(), Binary(), etc. Those objects are module-to-database only,
1309
the type system still takes care of the database-to-python
1312
2001-06-01 Federico Di Gregorio <fog@debian.org>
1316
* module.h: better error message when trying to commit on a
1317
cursor derived from serialized connection.
1319
* ZPsycopgDA/db.py (DB.close): now self.cursor is set to None when
1320
the connection is closed.
1322
* module.c (initpsycopg): added missing (sic) DBAPI module
1323
parameters (paramstyle, apilevel, threadsafety, etc...)
1325
2001-05-24 Michele Comitini <mcm@initd.net>
1327
* ZPsycopgDA: Support for Zope's internal DateTime, option
1328
to leave mxDateTime is available on the management interface so
1329
to switch with little effort :).
1331
* cursor.c: more aggressive cleanup of postgres results
1332
to avoid the risk of memory leaking.
1334
* typeobj.c, connection.c: deleted some Py_INCREF which
1337
2001-05-18 Federico Di Gregorio <fog@debian.org>
1341
2001-05-17 Michele Comitini <mcm@initd.net>
1343
* ZPsycopgDA/db.py: The connection closed by the management
1344
interface of zope now raises error instead of reopening itself.
1346
* cursor.c (psyco_curs_close): does not try to free the cursor
1347
list, as it caused a segfault on subsequent operations on the same
1350
2001-05-07 Federico Di Gregorio <fog@debian.org>
1354
* Merged in changes from me and mcm.
1356
2001-05-06 Michele Comitini <mcm@initd.net>
1358
* ZPsycopgDA/db.py (DB.close): Fixes a bug report by Andre
1359
Shubert, which was still open since there was a tiny typo in
1362
* ZPsycopgDA/DA.py (Connection.sql_quote__): overriding standard
1363
sql_quote__ method to provide correct quoting (thank to Philip
1364
Mayers and Casey Duncan for this bug report).
1366
2001-05-04 Federico Di Gregorio <fog@debian.org>
1368
* ZPsycopgDA/db.py: added .close() method (as suffested by Andre
1371
2001-05-04 Michele Comitini <mcm@initd.net>
1373
* module.h: working on a closed object now raises an
1376
* ZPsycopgDA/db.py: fixed problems with dead connections detection.
1378
* ZPsycopgDA/__init__.py: corrected SOFTWARE_HOME bug for zope
1381
2001-05-04 Federico Di Gregorio <fog@debian.org>
1383
* examples/thread_test.py: now that the serialization bug is
1384
fixed, it is clear that thread_test.py is bugged! added a commit()
1385
after the creation of the first table to avoid loosing it on the
1386
exception raised by the CREATE of an existing table_b.
1388
2001-05-03 Federico Di Gregorio <fog@debian.org>
1390
* connection.c (psyco_conn_cursor): reverted to old locking
1391
policy, the new caused a nasty deadlock. apparently the multiple
1392
connection problem has been solved as a side-effect of the other
1395
* module.h: removes stdkeeper field from connobject, we don't need
1398
* cursor.c (dispose_pgconn): now sets self->keeper to NULL to
1399
avoid decrementing the keeper refcnt two times when the cursor is
1400
first closed and then destroyed.
1402
* connection.c (psyco_conn_cursor): fixed little bug in cursor
1403
creation: now the connection is locked for the entire duration of
1404
the cursor creation, to avoid a new cursor to be created with a
1405
new keeper due to a delay in assigning the stdmanager cursor.
1407
* cursor.c: added calls to pgconn_set_critical() and to
1408
EXC_IFCRITICAL() where we expect problems. Still segfaults but at
1409
least raise an exception...
1411
* cursor.c (psyco_curs_autocommit): added exception if the
1412
cursor's keeper is shared between more than 1 cursor.
1414
* module.h (EXC_IFCRITICAL): added this macro that call
1415
pgconn_resolve_critical) on critical errors.
1417
* cursor.c (alloc_keeper): added check for pgres == NULL.
1419
* cursor.c (psyco_curs_destroy): merged psyco_curs_destroy() and
1420
psyco_curs_close(): now both call _psyco_curs_close() and destroy
1421
does only some extra cleanup.
1423
2001-05-03 Michele Comitini <mcm@initd.net>
1425
* ZPsycopgDA/db.py: Some cleanup to bring the zope product up to
1426
date with the python module. Some bugs found thanks to Andre
1427
Schubert. Now the ZDA should rely on the new serialized version
1430
* cursor.c: while looking for problems in the ZDA some come out
1431
here, with the inability to handle dropping connection correctly.
1432
This leads to segfaults and is not fixed yet for lack of time.
1433
Some problems found in cursors not willing to share the same
1434
connection even if they should. Hopefully it should be fixed
1437
2001-04-26 Federico Di Gregorio <fog@debian.org>
1439
* fixed bug reported by Andre Schubert by adding a new cast
1440
function for long integers (int8 postgresql type.) at now they are
1441
converted to python LongIntegers: not sure f simply convert to
1444
* michele applied patch from Ivo van der Wijk to make zpsycopgda
1445
behave better when INSTANCE_HOME != SOFTWARE_HOME.
1447
* cursor.c (_psyco_curs_execute): also fill the 'columns' field.
1449
* module.h: added a 'columns' field to cursobject, to better
1450
support the new dictionary fetch functions (dictfetchone(),
1451
dictfetchmany(), dictfetchall().)
1453
* cursor.c: added the afore-mentioned functions (function names
1454
are not definitive, they will follow decisions on the DBAPI SIG.)
1456
2001-04-03 Federico Di Gregorio <fog@debian.org>
1460
* mcm fixed a nasty bug by correcting a typo in module.h.
1462
2001-03-30 Federico Di Gregorio <fog@debian.org>
1464
* module.c (psyco_connect): added `serialized' named argument to
1465
the .connect() method (takes 1 or 0 and initialize the connection
1466
to the right serialization state.)
1468
* Makefile.pre.in (dist): fixed little bug, a missing -f argument
1471
* examples/thread_test.py: removed all extension cruft.
1473
* examples/thread_test_x.py: this one uses extensions like the
1474
per-cursor commit, autocommit, etc.
1476
* README (psycopg): added explanation on how .serialize() works.
1478
* connection.c (psyco_conn_serialize): added cursor serialization
1479
and .serialize() method on the connection object. now we are
1480
definitely DBAPI-2.0 compliant.
1482
2001-03-20 Federico Di Gregorio <fog@debian.org>
1484
* cursor.c (_psyco_curs_execute): replaced some fields in
1485
description with None, as suggested on the DB-SIG ML.
1487
* something like one hundred of little changes to allow cursors
1488
share the same postgres connection. added connkeeper object and
1489
pthread mutexes (both in connobject and connkeeper.) apparently it
1490
works. this one will be 0.5.0, i think.
1492
2001-03-19 Michele Comitini <mcm@initd.net>
1494
* cursor.c: added mutexes, they do not interact well with python
1497
2001-03-16 Michele Comitini <mcm@initd.net>
1499
* ZPsycopgDA/db.py (ZDA): some fixes in table browsing.
1501
2001-03-16 Federico Di Gregorio <fog@debian.org>
1503
* suite/tables.postgresql (TABLE_DESCRIPTIONS): fixed some typos
1504
introduced by copying by hand the type values from pg_type.h.
1506
* suite/*: added some (badly) structured code to test for
1507
DBAPI-2.0 compliance.
1509
* cursor.c (pgconn_notice_callback): now the NOTICE processor only
1510
prints NOTICEs when psycopg has been compiled with the
1511
--enable-devel switch.
1513
* connection.c: removed 'autocommit' attribute, now is a method as
1514
specified in the DBAPI-2.0 document.
1516
2001-03-15 Federico Di Gregorio <fog@debian.org>
1518
* connection.c (curs_commitall): splitted for cycle in two to
1519
avoid the "bad snapshot" problem.
1521
2001-03-14 Federico Di Gregorio <fog@debian.org>
1525
* cursor.c (_psyco_curs_execute): fixed nasty bug, there was an
1526
free(query) left from before the execute/callproc split.
1528
* Preparing for 0.4.6.
1530
2001-03-13 Federico Di Gregorio <fog@debian.org>
1532
* cursor.c (psyco_curs_execute): fixed some memory leaks in
1533
argument parsing (the query string was not free()ed.)
1534
(psyco_curs_callproc): implemented callproc() method on cursors.
1535
(_psyco_curs_execute): this is the function that does the real
1536
stuff for callproc() and execute().
1537
(pgconn_notice_*): added translation of notices into python
1538
exceptions (do we really want that?)
1540
* configure.in: removed some cruft (old comments and strncasecmp()
1543
2001-03-12 Federico Di Gregorio <fog@debian.org>
1545
* examples/thread_test.py: added moronic argument parsing: now you
1546
can give the dsn string on the command line... :(
1550
2001-03-10 Federico Di Gregorio <fog@debian.org>
1552
* cursor.c (request_pgconn): added code to set datestyle to ISO on
1553
new connections (many thanks to Yury <yura@vpcit.ru> for the code,
1554
i changed it just a little bit to raise an exception on error.)
1556
2001-03-09 Federico Di Gregorio <fog@debian.org>
1560
* ZPsycopgDA/db.py: michele fixed a nasty bug here.
1562
2001-03-08 Federico Di Gregorio <fog@debian.org>
1566
2001-03-07 Federico Di Gregorio <fog@debian.org>
1568
* Makefile.pre.in (dist): typeobj_builtins.c included for people
1569
without pg_type.h. if you encounter type-casting problems like
1570
results cast to the wrong type, simply "rm typeobj_builtins.c" and
1573
* typeobj.c (psyco_*_cast): removed RETURNIFNULL() macro from all
1574
the builtin casting functions. (psyco_STRING_cast) does not create
1575
a new string anymore, simply Py_INCREF its argument and return it.
1577
* cursor.c (psyco_curs_fetchone): removed strdup() call. added
1578
PQgetisnull() test to differentiate between real NULLs and empty
1581
* Removed cursor.py (mcm, put tests in examples) and fixed some
1582
typos in the dtml code.
1584
2001-03-04 Michele Comitini <mcm@initd.net>
1586
* examples/commit_test.py: Modifications to test argument passing
1587
and string substitution to cursor functions, nothing more.
1589
* ZPsycopgDA/db.py: now it exploits some of the good features of
1590
the psycopg driver, such as connection reusage and type
1591
comparison. Code is smaller although it handles (and
1592
reports) errors much better.
1594
* cursor.c: corrected a bug that left a closed cursor in the
1595
cursor list of the connection. Now cursors are removed from the
1596
lists either when they are close or when they are destroyed.
1597
Better connection (TCP) error reporting and handling.
1600
2001-03-02 Federico Di Gregorio <fog@debian.org>
1602
* examples commit_test.py: added code to test autocommit.
1604
* examples/thread_test.py (ab_select): modified select thread to
1605
test autocommit mode.
1609
* module.h, connection.c, cursor.c: added autocommit support.
1611
2001-02-28 Federico Di Gregorio <fog@debian.org>
1615
2001-02-27 Michele Comitini <mcm@initd.net>
1617
* cursor.py: cut some unuseful code in psyco_curs_fetchmany() and
1618
psyco_curs_fetchall() inserted an assert in case someting goes
1621
2001-02-27 Federico Di Gregorio <fog@debian.org>
1623
* debian/*: various changes to build both the python module and
1624
the zope db adapter in different packages (respectively
1625
python-psycopg and zope-psycopgda.)
1627
* examples/type_test.py: better and more modular tests.
1629
* typeobj.c: added DATE, TIME, DATETIME, BOOLEAN, BINARY and ROWID
1630
types. (RETURNIFNULL) added NULL-test to builtin conversion
1631
functions (using the RETURNIFNULL macro.)
1633
2001-02-26 Federico Di Gregorio <fog@debian.org>
1635
* releasing 0.3 (added NEWS file.)
1637
2001-02-26 Michele Comitini <mcm@initd.net>
1639
* cursor.c: fetchmany() some cleanup done.
1641
* ZPsycopgDA/db.py, ZPsycopgDA/__init__.py, : fixes to make the
1642
ZDA work some way. WARNING WARNING WARNING the zda is still
1643
alpha code, but we need some feed back on it so please give it
1646
2001-02-26 Federico Di Gregorio <fog@debian.org>
1648
* typeobj.c (psyco_STRING_cast): fixed bad bad bad bug. we
1649
returned the string without coping it and the type-system was more
1650
than happy to Py_DECREF() it and trash the whole system. fixed at
1653
* module.h (Dprintf): added pid to every Dprintf() call, to
1654
facilitate multi-threaded debug.
1656
2001-02-26 Michele Comitini <mcm@initd.net>
1658
* module.c: added code so that DateTime package need not to be
1659
loaded to have mxDateTime. This should avoid clashing with
1660
DateTime from the zope distribution.
1662
* cursor.c: setting error message in fetchmany when no more tuples
1663
are left. This has to be fixed in fetch and fetchall to.
1665
2001-02-26 Federico Di Gregorio <fog@debian.org>
1667
* configure.in: stepped up version to 0.3, ready to release
1668
tomorrow morning. added check for path to DateTime module.
1670
* examples/usercast_test.py: generate some random boxes and
1671
points, select the boxes with at least one point inside and print
1672
them converting the PostgeSQL output using a user-specified cast
1675
2001-02-24 Federico Di Gregorio <fog@debian.org>
1677
* cursor.c (psyco_curs_fetchone): now an error in the python
1678
callback when typecasting results raise the correct exception.
1680
* typeobj.c (psyco_DBAPITypeObject_call): removed extra Py_INCREF().
1682
2001-02-23 Federico Di Gregorio <fog@debian.org>
1684
* replaced every single instance of the string 'pgpy' with 'psyco'
1685
(this was part of the general cleanup.)
1687
* type_test.py: added this little test program to the distribution
1688
(use the new_type() method to create new instances of the type
1691
* typeobj.c: general cleanup. fixed some bugs related to
1692
refcounting (again!)
1694
* cursor.c: general cleanup. (request_pgconn) simplified by adding
1695
a support function (_extract_pgconn.)
1697
* connection.c: general cleanup. replaced some ifs with asserts()
1698
in utility functions when errors depend on programming errors and
1699
not on runtime exceptions. (pgpy_conn_destroy) fixed little bug
1700
when deleting available connections from the list.
1702
* module.h: general cleanup.
1704
* typeobj.h: general cleanup, better comments, made some function
1705
declarations extern.
1707
* module.c: general cleanup, double-checked every function for
1708
memory leaks. (pgpy_connect) removed unused variable 'connection'.
1710
2001-02-22 Federico Di Gregorio <fog@debian.org>
1712
* typeobj.c: fixed lots of bugs, added NUMBER type object. now the
1713
basic tests in type_test.py work pretty well.
1715
* cursor.c (pgpy_curs_fetchmany): fixed little bug, fetchmany()
1716
reported one less row than available.
1718
* fixed lots of bugs in typeobj.c, typeobj.h, cursor.c. apparently
1719
now the type system works. it is time to clean up things a little
1722
2001-02-21 Federico Di Gregorio <fog@debian.org>
1724
* typeobj.c: separated type objects stuff from module.c
1726
* typeobj.h: separated type objects stuff from module.h
1728
2001-02-19 Federico Di Gregorio <fog@debian.org>
1730
* cursor.c (pgpy_curs_fetchmany): now check size and adjust it to
1731
be lesser or equal than the nuber of available rows.
1733
2001-02-18 Michele Comitini <mcm@initd.net>
1735
* module.c, module.h: added optional args maxconn and minconn to
1736
connection functions
1738
* cursor.c: better error checking in request_pgconn.
1740
* connection.c: changed new_connect_obj to take as optional args
1741
maxconn and minconn. Added the corresponding ro attributes to
1744
* cursor.py: added some code to stress test cursor reusage.
1746
* cursor.c: some fixes on closed cursors.
1748
* connection.c: corrections on some assert calls.
1750
2001-02-16 Federico Di Gregorio <fog@debian.org>
1752
* configure.in: added --enable-priofile sqitch. changed VERSION to
1753
0.2: preparing for a new release.
1755
* cursor.c: added a couple of asserts.
1757
2001-02-16 Michele Comitini <mcm@initd.net>
1759
* cursor.c, connection.c: fixed the assert problem: assert must
1760
take just the value to be tested! no assignemente must be done in
1761
the argument of assert() otherwise is wiped when NDEBUG is set.
1763
* module.h: some syntax error fixed. Error in allocating a tuple
1764
corrected in macro DBAPITypeObject_NEW().
1766
* module.c: pgpy_DBAPITypeObject_init() is not declared static anymore.
1768
* cursor.c: executemany() now does not create and destroy tuples
1769
for each list item, so it is much faster.
1771
2001-02-14 Michele Comitini <mcm@initd.net>
1773
* cursor.c: added again Py_DECREF on the cpcon after disposing
1774
it. assert() with -DNDEBUG makes the driver segfault while it
1778
2001-02-13 Federico Di Gregorio <fog@debian.org>
1780
* some of the memory leak were memprof errors, bleah. resumed some
1781
old code, fixed segfault, fixed other bugs, improved speed. almost
1782
ready for a new release.
1784
* connection.c (pgpy_conn_destroy): replaced some impossible ifs
1787
* cursor.c (pgpy_curs_close): added Py_DECREF() to
1788
self->descritpion to prevent a memory leak after an execute().
1790
* connection.c (pgpy_conn_destroy): always access first element of
1791
lists inside for cycles because removing items from the list makes
1792
higher indices invalid.
1794
* cursor.c (dispose_pgconn): fixed memory leak, there was a
1795
missing Py_DECREF() after the addition of the C object wrapping
1796
the postgresql connection to the list of available connections.
1798
* cursor.c (dispose_pgconn): fixed another memory leak: an
1799
orphaned cursor should call PQfinish() on its postgresql
1800
connection because it has no python connection to give the
1801
postgresql ine back.
1803
* cursor.c (pgpy_curs_execute): added Py_DECREF() of description
1804
tuple after adding it to self->description. this one fixes the
1805
execute() memory leak.
1807
* cursor.c (pgpy_curs_fetchall): added missing Py_DECREF() on row
1808
data (obtained from fetchone().) this fixes the last memory leak.
1809
(thread_test.py now runs without leaking memory!)
1811
2001-02-12 Federico Di Gregorio <fog@debian.org>
1813
* INSTALL: removed wok cruft from head of this file.
1815
* debian/rules: debianized the sources. python-psycopg is about to
1816
enter debian. mxDateTime header locally included until the
1817
maintainer of python-mxdatetime includes them in his package
1818
(where they do belong.)
1820
* autogen.sh: added option --dont-run-configure.
1822
2001-02-09 Federico Di Gregorio <fog@debian.org>
1824
* module.c (initpsycopg): changed name of init function to match
1825
new module name (also changed all the exception definitions.)
1827
* README: updated psycopg description (we have a new name!)
1829
* Ready for 0.1 release.
1831
2001-02-07 Michele Comitini <mcm@initd.net>
1833
* cursor.c: now executemany takes sequences and not just
1836
2001-02-07 Federico Di Gregorio <fog@debian.org>
1838
* Makefile.pre.in: now dist target includes test programs
1839
(thread_test.py) and README and INSTALL files.
1841
* configure.in: changed --with-devel to --enable-devel. little
1842
cosmetical fixes to the option management.
1844
* connection.c, module.c, cursor.c, module.h: removed 'postgres/'
1845
from #include directive. it is ./configure task to find the right
1848
* thread_test.py: added thread testing program.
1850
2001-02-07 Michele Comitini <mcm@initd.net>
1852
* cursor.c: added code to allow threads during PQexec() calls.
1854
* cursor.c: added begin_pgconn to rollback() and commit()
1855
so that the cursror is not in autocommit mode.
1857
* cursor.c: added rollback() and commit() methods to cursor
1861
2001-02-07 Federico Di Gregorio <fog@debian.org>
1863
* connection.c (pgpy_conn_destroy): always delete item at index
1864
0 and not i (because items shift in the list while deleting and
1865
accessing items at len(list)/2 segfaults.)
1867
2001-02-07 Michele Comitini <mcm@initd.net>
1869
* connection.c: added some more checking to avoid
1870
clearing of already cleared pgresults. Calling curs_closall()
1871
in conn_destroy() since cursors have to live even without
1872
their parent connection, otherwise explicit deletion of
1873
object referencing to those cursors can cause arbitrary code
1876
* cursor.c: some more checking to avoid trying to close
1877
already close pgconnections.
1879
2001-02-06 Federico Di Gregorio <fog@debian.org>
1881
* Makefile.pre.in (CFLAGS): added -Wall to catch bad programming
1884
* cursor.c, connection.c: lots of fixes to the destroy stuff. now
1885
all the cursor are destroyed *before* the connection goes away.
1887
* cursor.c (request_pgconn): another idiot error done by not
1888
replacing dsn with owner_conn->dsn. fixed.
1889
(dispose_pgconn): commented if to guarantee that the connection is
1890
returned to the pool of available connections.
1892
* merged changes done by mcm.
1894
* cursor.c: general cleanup and better debugging/error
1895
messages. changed xxx_conn into xxx_pgconn where still
1896
missing. some pretty big changes to the way pgconn_request()
1897
allocates new connections.
1899
* connection.c: removed all 'register' integers. obsolete, gcc
1900
does a much better job optimizing cycles than a programmer
1901
specifying how to use registers.
1903
* module.h: some general cleanup and better definition of DPrintf
1904
macro. now the DEBUG variable can be specified at configure time by
1905
the --with-devel switch to ./configure.
1907
2001-02-02 Michele Comitini <mcm@initd.net>
1909
* cursor.c (Repository): Added functions for managing a connection
1912
* configure.in (Repository): removed check for mxdatetime headers.
1914
2001-01-24 Federico Di Gregorio <fog@debian.org>
1916
* first checkout from shinning new init.d cvs.
1918
* autotoolized build system. note that the mx headers are missing
1919
from the cvs, you should get them someplace else (this is the
1920
right way to do it, just require the headers in the configure
1923
2001-01-21 Michele Comitini <mcm@initd.net>
1925
* cursor.c (Repository): commit, abort, begin functions now check
1926
the right exit status of the command.
1928
* connection.c (Repository): working commit() and rollback()
1931
2001-01-20 Michele Comitini <mcm@initd.net>
1933
* module.h (Repository): added member to cursor struct to handle
1934
queries without output tuples.
1936
* cursor.c (Repository): new working methods: executemany,
1937
fetchone, fetchmany, fetchall.
1939
2001-01-18 Michele Comitini <mcm@initd.net>
1941
* cursor.c (Repository): close working. destroy calling close.
1942
close frees pg structures correctly.
1944
* connection.c (Repository): close method working. destroy seems
1947
2001-01-17 Michele Comitini <mcm@initd.net>
1949
* cursor.c (Repository): now each python cursor has its own
1950
connection. Each cursor works in a transaction block.
1952
* connection.c (Repository): added cursor list to connection
1955
2001-01-14 Michele Comitini <mcm@initd.net>
1957
* cursor.c (Repository): Beginning of code to implement cursor
1958
functionalities as specified in DBA API 2.0, through the use of
1959
transactions not cursors.
1961
* connection.c (Repository): Added some error checking code for pg
1962
connection (will be moved to cursor?).
1964
2001-01-13 Michele Comitini <mcm@initd.net>
1966
* connection.c (Repository): Added error checking in connection
1967
code to fail if connection to the db could not be opened.
1969
* module.h (Repository): New macro to help creating
1972
* module.c (Repository): DBAPITypeObject __cmp__ function is now
1973
very simplified using recursion.
1975
* module.h (Repository): "DBAPIObject" changed to
1978
* module.c (Repository): Fixes for coerce function of DBAPIObjects
1979
by Federico Di Gregorio <fog@initd.net>.
1980
(Repository): Clean up and better naming for DBAPITypeObjects.
1982
2001-01-08 Michele Comitini <mcm@initd.net>
1984
* module.c (Repository): Corrected the exception hierarcy
1986
* connection.c (Repository): Begun to use the connection objects
1989
2001-01-07 Michele Comitini <mcm@initd.net>
1991
* module.c (Repository): Added the Date/Time functions.
1993
2001-01-06 Michele Comitini <mcm@initd.net>
1995
* cursor.c (Repository): Skeleton of cursor interface. All
1996
methods and attributes of cursor objects are now available
1997
in python. They do nothing now.
1999
2001-01-05 Michele Comitini <mcm@initd.net>
2001
* module.c (Repository): Test version; module loaded with
2004
2001-01-05 Michele Comitini <mcm@initd.net>
2006
* Setup.in (Repository): Setup file.
2008
* Makefile.pre.in (Repository): from the python source.
2010
2001-01-05 Michele Comitini <mcm@initd.net>
2012
* module.c: Written some code for defining exceptions.
2014
* module.h: Static variable for exceptions.
2016
2001-01-04 Michele Comitini <mcm@initd.net>
2018
* Changelog: pre-release just a few prototypes to get started.
357
* psycopg/*: beginning of new source layout. if you think this
358
changelog is somewhat empty, you're right. look at
359
doc/ChangeLog-1.x for psycopg 1.x changelog just before the