1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
|
2005-07-16 Federico Di Gregorio <fog@debian.org>
* Release 1.1.19.
* Makefile.pre.in (dist): remove .svn directories on packaging and
update.
* cursor.c (_psyco_curs_execute): applied patch submitted to
tracker (ticket #10) to fix the problem with wrong exception types
on PostgreSQL 8.x.
2005-05-15 Federico Di Gregorio <fog@debian.org>
* Release 1.1.19. (Not shipped.)
* debian/*: applied patch from Martin Krafft to build zope 2.7
packages and (in the future) switch ZPsycopgDA maintenance to the
zope maintainers group.
2005-04-15 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_dictfetchone): fixed segfault caused by not
checking result of psyco_curs_fetchone against NULL.
2005-03-23 Federico Di Gregorio <fog@debian.org>
* James Henstridge did it again: another patch to fix segfaults
related to calling certain methods on a closed connection object.
2005-03-22 Federico Di Gregorio <fog@debian.org>
* Applied patch from James Henstridge to avoid segfaults in
_curs_doall() (see psycopg mailing list "PATCH: psycopg1
thread-safety bug in commit() and rollback()" for details.
2005-02-14 Federico Di Gregorio <fog@debian.org>
* typemod.c (psyco_DateTimeObject_str): new conversion algorithm
that build the string from scratch instead of calling
strftime(). Note that mx.DateTime keeps the seconds in a float so,
even if this is better than the old method there can still be
rouding errors.
2005-01-29 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): fixed scale segfault (found by
Andrea Arcangeli).
2005-01-18 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): fixed precion and scale (they
were inverted and scale was larger by 4!)
2005-01-13 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (DB.query): applied patch from Jonathan
Stoneman to automatically try to reconnect *once* on
OperationalError. This fix the problem with Zope loosing the
connection to the database when PostgreSQL is restarted.
2005-01-05 Federico Di Gregorio <fog@debian.org>
* Release 1.1.18.
2005-01-04 Federico Di Gregorio <fog@initd.org>
* ZPsycopgDA/DA.py: removed mktime() calls from all the conversion
functions to avoid overflow errors.
2004-11-19 Federico Di Gregorio <fog@initd.org>
* aclocal.m4: applied patch from Sander Steffann to build on 64
bit platforms.
2004-11-19 Federico Di Gregorio <fog@iris>
* Release 1.1.17.
* Makefile.pre.in: removed GeoTypes from base package.
2004-11-18 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py: remove fractional part in cast_DateTime to
avoid time.strptime raising an exception (bug reported by
Yves Bastide.)
2004-11-18 Federico Di Gregorio <fog@debian.org>
* Applied patch from Yves Bastide to have ZPsycopgDA return
unicode strings on request.
2004-11-17 Federico Di Gregorio <fog@debian.org>
* Release 1.1.16.
2004-11-16 Federico Di Gregorio <fog@debian.org>
* cursor.c: now does not use COPY TO/COPY FROM arguments unless
they really came from .copy_from() and .copy_to() methods. This
fixes a segfault reported as Debian bug #279222.
2004-10-30 Federico Di Gregorio <fog@debian.org>
* Preparing release 1.1.16.
2004-10-29 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify): fixed problem with %% not being transformed
into % when calling .execute() with a zero-length tuple or dict.
2004-9-27 Federico Di Gregorio <fog@lana.initd.org>
* cursor.c (_psyco_curs_execute): atoi->atol as suggested by Sylvain
Falardeau.
2004-09-17 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (cast_DateTime): implemented suggestion by
Andreas Jung to speed-up cast_Date and cast_dateTime. cast_Time
will need some more work.
2004-09-11 Federico Di Gregorio <fog@debian.org>
* connection.c (_psyco_conn_close): applied "trivial patch" by
Marco Bizzarri.
2004-09-04 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): fixed rowcount by using
PQcmdTuples as suggested by Vsevolod Lobko.
2004-07-29 Federico Di Gregorio <fog@debian.org>
* Release 1.1.15.
* cursor.c (_psyco_curs_execute): reverted change to rowcount
2004-07-15 Federico Di Gregorio <fog@debian.org>
* typemod.c (psyco_Binary): fixed two memory leaks in QuotedString
and Binary; many thanks to Stefan Schwarzer and valgrind.
2004-07-13 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify): move Dprintf some lines below to avoid
dereferencing zero pointer. Thanks to Manuele Rampazzo for
reporting it and Jason Erickson for the fix.
2004-07-10 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): argh, fixed typo in interval
conversion.
2004-07-09 Federico Di Gregorio <fog@debian.org>
* Release 1.1.14.
2004-07-04 Federico Di Gregorio <fog@debian.org>
* Release 1.1.14pre2.
* cursor.c (pgconn_notice_callback): if the message is an error,
set the right Python exception. (_psyco_curs_execute): if the
notice callback set an error during a COPY, now exit with NULL to
raise the exception.
2004-07-01 Federico Di Gregorio <fog@debian.org>
* Release 1.1.14pre1.
* ZPsycopgDA/DA.py: added support for backend encodings.
* ZPsycopgDA/db.py (DB.query): added query_data to pass
arguments to the execute method; also added query string encoding.
* cursor.c: fixed DBAPI-2.0 compliance:
- psyco_curs_executemany: rowcount set to -1 because number of
affected columns can't be determined
- psyco_curs_setoutputsize: parse aguments
- _psyco_curs_execute: set rowcount to -1 for PGRES_COMMAND_OK
(INSERT or UPDATE executed)
* typeobj.c (psyco_INTERVAL_cast): fixed sign problem in interval
by directly checking last sign encountered instead of hours's.
* doc/examples/interval.py: added script to check for problem
reported by Marcin Engelmann.
2004-06-21 Federico Di Gregorio <fog@debian.org>
* configure.in: applied patch from Anthony Baxter to build on
Fedora core 2.
2004-05-21 Federico Di Gregorio <fog@debian.org>
* Release 1.1.13.
* ZPsycopgDA/DA.py (manage_addZPsycopgConnection): fixed bug
reported by Hiroyuki SHINDO (check and tilevel parameter inverted
in Connection call.)
2004-05-16 Federico Di Gregorio <fog@debian.org>
* Release 1.1.12.
2004-04-24 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): applied patch from Ross Cohen
to fix time intervals in range (00:00, -01:00).
2004-04-14 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_destroy): added slightly modified patch
from Ricardo Caesar Lenzi to reduce the number of opened
connections when cursors are closed.
2004-02-29 Federico Di Gregorio <fog@debian.org>
* cursor.c (alloc_keeper): PQprotocolVersion used in debug
statement only if available (postgresql version >= 7.4).
2004-02-23 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py: small changes to make transaction level patch
compatible with old connection objects without the need to
recreate them.
2004-02-18 Federico Di Gregorio <fog@debian.org>
* connection.c (_curs_doall): removed some redundant code by
passing the right function pointer to _curs_doall (patch from
David Gould.)
2004-02-17 Federico Di Gregorio <fog@debian.org>
* connection.c (_psyco_conn_set_isolation_level): bounds check on
the isolation level added (as suggested by David Gould.)
2004-02-12 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA: applied patch from Yury Don to added transaction
isolation level to ZPsycopgDA.
2004-01-17 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_TIME_cast): now we correctly use a
DateTimeDelta for postgresql times (as suggested by Daniele
Varrazzo.)
* cursor.c (curs_switch_isolation_level): removed ALLOW_THREADS
macros to avoid deadlock while calling cursor() on the same
connection. Remember to redo the whole locking thing in psycopg 2.
2004-01-10 Federico Di Gregorio <fog@debian.org>
* module.c (psyco_connect): added "sslmode" parameter.
2004-01-08 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify): now raise the correct excetion instead of a
generic TypeError (bug reported by Mark McClain).
* psycopg.spec: added updated RPM spec file from Simon Willison.
* cursor.c (_mogrify): applied patch from Menno Smits to fix
mogrification of strings containing %%.
2003-12-21 Federico Di Gregorio <fog@debian.org>
* connection.c (_psyco_conn_set_isolation_level): applied patch
discussed with Sebastien Bigaret to avoid other threads to modify
the cursor list while switching isolation level. This should fix
the segfault reported some time ago.
2003-12-18 Federico Di Gregorio <fog@debian.org>
* Release 1.1.11.
* cursor.c (_psyco_curs_execute): removed some cruft in COPY_IN,
"psyco_curs_reset(self, 0);" some 20 lines before already cleans
the cursor.
* cursor.c (COPY FROM implementation): plugged possible memory
leak reported by Paul Reznicek:
- in _psyco_curs_copy_from "o" was not DECREFfed when exiting
cycle via break
- in psyco_curs_copy_from PyObject_GetAttrString return a new
reference, substitued with PyObject_HasAttrString
2003-12-15 Federico Di Gregorio,,, <fog@localhost.localdomain>
* connection.c: moved some declaration before code to avoid
non-standard compilers to complain.
2003-12-12 Federico Di Gregorio <fog@debian.org>
* connection.c: applied patch from Sebastien Bigaret to make
commit and rollback methods raise an exception on database errors.
* ZPsycopgDA/db.py (DB.query): as per Geoff Davis suggestion,
changed string compare (note: we need a better way, maybe return
new numeric error code from protocol 3.0 in psycopg exception?)
2003-11-21 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): now use PQresultErrorField when
protocol 3.0 in use.
* VERSION: removed, it is now generated when running autoconf.
* module.h & co.: moved around a lot of #includes trying to get
rid of re-definition warnings. *this need testing* on all
platforms.
2003-11-08 Federico Di Gregorio <fog@debian.org>
* Ehi, this is 1.1.10.
* cursor.c (_mogrify): removed memory leak by adding some DECREFs
(see also mail+patch from Chris Douty on psycopg mailing list.)
* ZPsycopgDA/DA.py: shortened list of compatible versions: nobody
should be using <1.1.7 anyway.)
2003-09-10 Federico Di Gregorio <fog@debian.org>
* Release 1.1.9.
* Makefile.pre.in (dist): we now include the GeoTypes package in
psycopg distribution.
2003-09-08 Federico Di Gregorio <fog@debian.org>
* Makefile.pre.in: added PYTHONFRAMEWORK to fix MacOS X
builds.
2003-09-06 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify): sequences were mogrified wrong because of
index being initialized to -1. it is now initialized to 0 (thanks
to Vsevolod Lobko.)
2003-09-03 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify): no more problems when passing an empty
(without markers) format string.
2003-08-31 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify): fixed the sequence/dict problem by
completely rewriting the mogrification code.
2003-08-22 Federico Di Gregorio <fog@debian.org>
* Release 1.1.9pre1.
2003-08-19 Federico Di Gregorio <fog@debian.org>
* configure.in: added check for PQfreeNotify.
* cursor.c (psyco_curs_execute): added check on python version to
fix problem with python 2.3 PyMapping_Check() returning true while
checking list or sequences.
2003-08-01 Federico Di Gregorio <fog@debian.org>
* Release 1.1.8.
* configure.in: patch from Vsevolod Lobko to find postgresql
headers under BSD ports.
* cursor.c (alloc_keeper): PQconnectdb is not thread safe, removed
Py_*_THREADS wrapper to fix problem reported by Vsevolod Lobko.
2003-07-31 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_execute): in python 2.3 *every* object
supports the mapping protocol breaking sequence mogrification:
problem fixed by checking first for sequences, then for
mappings. (psycopg really needs a regression tests suite!)
2003-07-26 Federico Di Gregorio <fog@debian.org>
* Release 1.1.7.
* ZPsycopgDA/db.py: added _cursor method that checks for self.db
before returning a new cursor. Should fix problem reported with
Zope 2.7.
2003-07-23 Federico Di Gregorio <fog@debian.org>
* cursor.c: applied notify and fileno patch from Vsevolod Lobko.
2003-07-20 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify_dict): applied (slightly modofied) patch from
Tobias Sargeant: now .execute() accept not only dictionaries but
every type that has a __getitem__ method.
2003-07-13 Federico Di Gregorio <fog@debian.org>
* Release 1.1.6.
* cursor.c (psyco_curs_scroll): added scroll method, patch from
Jason D.Hildebrand.
* typemod.c (new_psyco_quotedstringobject): discard NUL characters
(\0) in quoted strings (fix problem reported by Richard Taylor.)
2003-07-10 Federico Di Gregorio <fog@debian.org>
* Added python-taylor.txt in doc directory: very nice introduction
to DBAPI programming by Richard Taylor.
2003-07-09 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): another MT problem exposed and
fixed by Sebastien Bigaret (self->keeper->status still LOCKED
after a fatal error during PQexec call.)
2003-06-23 Federico Di Gregorio <fog@debian.org>
* Release 1.1.5.1.
* ZPsycopgDA/db.py (DB.query): stupid error making ZPsycopgDA
unusable fixed (else->except).
2003-06-22 Federico Di Gregorio <fog@debian.org>
* Release 1.1.5 candidate.
* cursor.c (psyco_curs_copy_to): now any object with the write
method can be used as a copy_to target.
2003-06-20 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_copy_from): applied patch to allow copy_to
from any object having a "readline" attribute (patch from Lex
Berezhny.) (psyco_curs_copy_from): another patch from Lex to make
psycopg raise an error on COPY FROM errors.
* ZPsycopgDA/db.py (DB.query): if a query raise an exception,
first self._abort() is called to rollback current
"sub-transaction". this is a backward-compatible change for
people that think continuing to work in the same zope transaction
after an exception is a Good Thing (TM).
* finally updated check_types.expected. checked by hand the
conversions work the right way.
* doc/examples/work.py: fixed example. note that it is a long time
(at least two releases) that psycopg does not END a transaction
initiated explicitly by the user while in autocommit mode.
2003-06-19 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify_dict): fixed dictionary mogrification (patch
by Vsevolod Lobko.) (_psyco_curs_execute): fixed keeper status
trashing problem by letting only one thread at time play with
keeper->status (as suggested by Sebastien Bigaret.)
2003-05-07 Federico Di Gregorio <fog@debian.org>
* Release 1.1.4.
* cursor.c: Added "statusmessage" attribute that holds the backend
message (modified lots of functions, look for self->status).
2003-05-06 Federico Di Gregorio <fog@debian.org>
* typemod.c (new_psyco_datetimeobject): moved Py_INCREF into
XXX_FromMx functions, to fix memory leak reported by Jim Crumpler.
2003-04-11 Federico Di Gregorio <fog@debian.org>
* module.h (PyObject_TypeCheck): fixed leak in python 2.1
(Guido van Rossum).
2003-04-08 Federico Di Gregorio <fog@debian.org>
* buildtypes.py (basic_types): removed LXTEXT (never user, does
not exists anymore.)
2003-04-07 Federico Di Gregorio <fog@debian.org>
* setup.py: added very lame setup.py script.
2003-04-02 Federico Di Gregorio <fog@debian.org>
* Release 1.3.
* psycopg.spec: Added (but modified) spec file by William
K. Volkman (again, this change was lost somewhere in time...)
2003-04-01 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): psycopg was reporting everything
as IntegrityError; reported and fix suggested by Amin Abdulghani.
2003-03-21 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_fetchone): debug statements sometimes made
psycopg segfault: fixed by a patch by Ken Simpson.
2003-03-18 Federico Di Gregorio <fog@debian.org>
* cursor.c (alloc_keeper): patch from Dieter Maurer to unlock GIL
whaile calling PQconnectdb().
2003-03-05 Federico Di Gregorio <fog@debian.org>
* Release 1.1.2.
* Applied cygwin patch from Hajime Nakagami.
2003-02-25 Federico Di Gregorio <fog@debian.org>
* Release 1.1.2pre1.
* cursor.c: added .lastrowid attribute to cursors (lastoid is
deprecated and will be removed sometime in the future.)
* cursor.c (begin_pgconn): implemented various isolation levels
(also, in abort_pgconn, commit_pgconn.)
* Added keyword parameters to psycopg.connect(): all take strings
(even port): database, host, port, user, password.
* configure.in: fixed test for postgres version > 7.2.
* cursor.c (_psyco_curs_execute): removed if on pgerr in default
case (if we enter default pgerr can't be one of the cased ones.)
Also applied slightly modified patch from William K. Volkman.
2003-02-24 Federico Di Gregorio <fog@debian.org>
* Merged in changes from 1.0.15.1 (see below for merged
ChangeLog.)
2003-02-14 Federico Di Gregorio <fog@debian.org>
* Release 1.0.15.1.
* cursor.c (_mogrify_fmt): in some cases we where removing one
character too much from the format string, resulting in BIG BAD
BUG. <g> Fixed.
2003-02-13 Federico Di Gregorio <fog@debian.org>
* Release 1.0.15. <g>
* connection.c (_psyco_conn_close): now call dispose_pgconn on all
cursors, to make sure all phisical connections to the db are
closed (problem first reported by Amin Abdulghani.)
* DBAPI-2.0 fixed mainly due to Stuart Bishop:
- cursor.c (psyco_curs_setinputsizes): removed PARSEARGS, as
this method does nothing.
- cursor.c (psyco_curs_setoutputsize): .setoutputsize was
spelled .setoutputsizes! fixed. Also removed PARSEARGS, as this
method does nothing.
2003-02-12 Federico Di Gregorio <fog@debian.org>
* module.h (Dprintf): check on __APPLE__ to avoid variadic macros
on macos x (as reported by Stuart Bishop, btw, why gcc seems to
not support them on macos?)
* cursor.c (_mogrify_fmt): non-alphabetic characters are dropped
after the closing ")" until a real alphabetic, formatting one is
found. (Fix bug reported by Randall Randall.)
2003-02-05 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): patched again to take into
account leading zeroes.
2003-02-02 Federico Di Gregorio <fog@debian.org>
* Makefile.pre.in: applied patch from Albert Chin-A-Young to
define BLDSHARED.
* README: added explicit permission to link with OpenSSL.
2003-01-30 Federico Di Gregorio <fog@debian.org>
* config.h.in: applied patch from Albert Chin-A-Young to fix
asprintf prototype.
2003-01-29 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify_seq): fixed little refcount leak, as
suggested by Yves Bastide.
2003-01-24 Federico Di Gregorio <fog@debian.org>
* Merged-in changes from 1.0.14.2 (emacs diff mode is great..)
* Release 1.0.14.2.
* ZPsycopgDA/db.py (DB.query): back to allowing up to 1000 db
errors before trying to reopen the connection by ourselves.
* ZPsycopgDA/db.py: a false (None preferred, 0 allowed) max_rows
value now means "fetch all results".
2003-01-22 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_fetchone): fixed little memory leak
reported by Dieter Maurer.
2003-01-20 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (DB.tables/columns): added registration with
Zope's transaction machinery.
* Release 1.0.14.1.
* ZPsycopgDA/db.py: applied some fixes and cleanups by Dieter
Maurer (serialization problem were no more correctly detected!)
* Release 1.0.14.
* Merged in 1.0.14.
* Import of 1.1.1 done.
* Moved everything to cvs HEAD.
2003-01-20 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/connectionAdd.dtml: fixed typo (thanks to Andrew
Veitch.)
* typeobj.c (psyco_INTERVAL_cast): applied patch from Karl Putland
to fix problems with fractional seconds.
2002-12-03 Federico Di Gregorio <fog@debian.org>
* Release 1.0.14-pre2.
* module.h: added macro for PyObject_TypeCheck if python version <2.2.
* typeobj.c (psyco_DBAPITypeObject_coerce): added error message to
coercion errors.
2002-12-02 Federico Di Gregorio <fog@debian.org>
* Release 1.0.14-pre1.
* ZPsycopgDA/db.py (DB.sortKey): added sortKey().
* ZPsycopgDA/DA.py: applied a patch that was lost on hard disk
(sic), if you sent me a patch names psycopg-1.0.13.diff modifying
DA.py imports and want your name here, send me an email. :)
[btw, the patch fix the ImageFile import, getting it from Globals
as it is right.]
* typeobj.c (psyco_DBAPITypeObject_coerce): Fixed coerce segfault
by checking explicitly for all the allowed types.
2002-11-25 Federico Di Gregorio <fog@debian.org>
* doc/examples/*.py: added .rollback() to all exceptions before
deleteing the old table.
* cursor.c: Apllied patch from John Goerzen (fix memory leak in
executemany).
2002-10-25 Federico Di Gregorio <fog@debian.org>
* Release 1.0.13.
* connection.c (_psyco_conn_close): remove cursors from the list
starting from last and moving backward (as suggested by Jeremy
Hylton; this is not such a big gain because python lists are
*linked* lists, but not removing the element 0 makes the code a
little bit clear.)
* cursor.c (_psyco_curs_execute): now IntegrityError is raised
instead of ProgrammingError when adding NULL values to a non-NULL
column (suggested by Edmund Lian) and on referential integrity
violation (as per debian bug #165791.)
* typeobj.c (psyco_DATE_cast): now we use 999999 instead of
5867440 for very large (both signs) dates. This allow to re-insert
the DateTime object into postgresql (suggested by Zahid Malik.)
2002-09-13 Federico Di Gregorio <fog@debian.org>
* Release 1.0.12.
* Removed code to support COPY FROM/TO, will be added to new 1.1
branch to be released next week.
* cursor.c (_mogrify_seq): Fixed memory leak reported by Menno
Smits (values obtained by calling PySequence_GetItem are *new*
references!)
2002-09-07 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): Added skeleton to support COPY
FROM/TO.
2002-09-06 Federico Di Gregorio <fog@debian.org>
* configure.in: if libcrypt can't be found we probably are on
MacOS X: check for libcrypto, as suggested by Aparajita Fishman.
2002-09-03 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (DB.columns): Applied patch from Dieter Maurer
to allow the DA-browser to work with mixed case table names.
2002-08-30 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (cast_DateTime): Applied patch from Yury to fix
timestamps (before they were returned with time always set to 0.)
2002-08-26 Federico Di Gregorio <fog@debian.org>
* Release 1.0.11.1 (to fix a %&£$"! bug in ZPsycopgDA not
accepting psycopg 1.0.11 as a valid version.
* Release 1.0.11.
2002-08-22 Federico Di Gregorio <fog@debian.org>
* Release 1.0.11pre2.
* cursor.c (_psyco_curs_execute): fixed IntegrityError as reported
by Andy Dustman. (psyco_curs_execute): converting TypeError to
ProgrammingError on wrong number of % and/or aeguments.
* doc/examples/integrity.py: added example and check for
IntegrityError.
2002-08-08 Federico Di Gregorio <fog@debian.org>
* Release 1.0.11pre1.
2002-08-06 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (cast_DateTime): patched as suggested by Tom
Jenkins; now it shouldwork with time zones too.
2002-08-01 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (cast_DateTime): fixed problem with missing
AM/PM, as reported by Tom Jenkins.
2002-07-23 Federico Di Gregorio <fog@debian.org>
* Fixed buglets reported by Mike Coleman.
2002-07-22 Federico Di Gregorio <fog@debian.org>
* Release 1.0.10.
2002-07-14 Federico Di Gregorio <fog@debian.org>
* Release 1.0.10pre2.
* typeobj.c (psyco_LONGINTEGER_cast): fixed bad segfault by
INCREFfing Py_None when it is the result of a NULL conversion.
2002-07-04 Federico Di Gregorio <fog@debian.org>
* Release 1.0.10pre1.
* buildtypes.py (basic_types): added TIMESTAMPTZ to the types
converted by the DATE builtin.
* ZPsycopgDA/DA.py (Connection.connect): Added version check.
2002-07-03 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_XXX_cast): fixed bug reported by multiple users
by appliying Matt patch.
2002-06-30 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (Connection.set_type_casts): applied patch from
Tom Jenkins to parse dates with TZ.
2002-06-20 Federico Di Gregorio <fog@debian.org>
* Preparing for release 1.0.9.
* Makefile.pre.in (dist): now we really include psycopg.spec.
2002-06-17 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (_finish, _abort): fixed problem with
connection left in invalid state by applying Tom Jenkins patch.
2002-06-06 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (DB._abort): fixed exception raising after an
error in execute triggerer deletion of self.db.
2002-05-16 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_fetchone): None values passed to the
internal typecasters.
* typeobj.c: added management of None to all the builtin
typecasters.
2002-04-29 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (cast_Time): applied 'seconds as a float' patch
from Jelle.
2002-04-23 Federico Di Gregorio <fog@debian.org>
* Release 1.0.8.
* Makefile.pre.in: we now include win32 related files in the
distribution.
* connection.c (psyco_conn_destroy): fixed segfault reported by
Scott Leerssen (we were double calling _psyco_conn_close().)
* typemod.c (new_psyco_quotedstringobject): fixed memory stomping
catched by assert(); thanks to Matt Hoskins for reporting this
one.
2002-04-22 Federico Di Gregorio <fog@debian.org>
* configure.in: grmpf. we need a VERSION file for windows, we'll
use it for configue and debian/rules too.
* Integrated win32 changes from Jason Erickson. Moved his
Readme.txt to README.win32, removed VERSION and DATE, patched
source where required. Renamed HISTORY to ChangeLog.win32, hoping
Jason will start adding changes to the real ChangeLog file.
2002-04-07 Federico Di Gregorio <fog@debian.org>
* Release 1.0.7.1.
* configure.in: fixed little bug as reported by ron.
2002-04-05 Federico Di Gregorio <fog@debian.org>
* Release 1.0.7?
* typemod.c (new_psyco_bufferobject): fixed encoding problem (0xff
now encoded as \377 and not \777.) Also encoding *all* chars as
quoted octal values to prevent "Invalid UNICODE character sequence
found" errors.
* Release 1.0.7. (Real this time.) (Ok, it was a joke....)
2002-04-03 Federico Di Gregorio <fog@debian.org>
* configure.in: fixed problem with postgres versions in the format
7.2.x (sic.)
* connection.c (psyco_conn_destroy): moved most of the destroy
stuff into its own function (_psyco_conn_close) and added a call
to it from psyco_conn_close. This should fix the "psycopg does not
release postgres connections on .close()" problem.
2002-03-29 Federico Di Gregorio <fog@debian.org>
* Release 1.0.7. Delayed.
* buildtypes.py (basic_types): added TIMESTAMPTZ postgres type to
the list of valid DATETIME types (incredible luck, no changes to
the parse are needed!)
* typeobj.c (psyco_DATE_cast): fixed wrong managment of sign in
infinity.
2002-03-27 Federico Di Gregorio <fog@debian.org>
* configure.in (INSTALLOPTS): added AC_PROG_CPP test, now uses
AC_TRY_CPP to test for _all_ required mx includes.
2002-03-19 Federico Di Gregorio <fog@debian.org>
* configure.in: added check for both pg_config.h and config.h to
detect postgres version.
* cursor.c: now None values are correctly handled when the format
string is not %s but %d, etc.
2002-03-08 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py: added MessageDialog import suggested by
Guido.
2002-03-07 Federico Di Gregorio <fog@debian.org>
* psycopg.spec: added RPM specs by William K. Volkman.
* Release 1.0.6.
* configure.in: imported changes to allow postgres 7.2 builds from
unstable branch.
2002-03-04 Federico Di Gregorio <fog@debian.org>
* Release 1.0.5.
* applied table browser patch from Andy Dustman.
2002-02-26 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_DATE_cast): added management of infinity
values, this can be done in a better way, by accessing the
MaxDateTime and MinDateTime constants of the mx.DateTime module.
2002-02-20 Federico Di Gregorio <fog@debian.org>
* configure.in: Release 1.0.4.
2002-02-12 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (DB.columns): fixed select to reenable column
expansion in table browsing.
* ZPsycopgDA/__init__.py: removed code that made psycopg think
double.
2002-02-11 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify_dict): removed Py_DECREF of Py_None,
references returned by PyDict_Next() are borrowed (thanks to
Michael Lausch for this one.)
2002-02-08 Federico Di Gregorio <fog@debian.org>
* A little bug slipped in ZPsycopgDA, releasing 1.0.3 immediately.
* Release 1.0.2.
* tests/check_types.py (TYPES): added check for hundredths of a
second.
2002-02-07 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): patched to correct wrong
interpretation of hundredths of a second (patch from
A. R. Beresford, kudos!)
2002-01-31 Federico Di Gregorio <fog@debian.org>
* FAQ: added.
2002-01-16 Federico Di Gregorio <fog@debian.org>
* Preparing for release 1.0.1.
* cursor.c (alloc_keeper): removed ALLOW_THREADS wrapper around
PQconnectdb: libpq calls crypt() that is *not* reentrant.
2001-12-19 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_DBAPITypeObject_cmp): added check to simply
return false when two type objects are compared (type objects are
meaned to be compared to integers!)
* typeobj.c: fixed the memory leak reported by the guys at
racemi, for real this time. (added about 5 DECREFS and 2 INCREFS,
ouch!)
2001-12-17 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_DBAPITypeObject_cmp): fixed memory leak by
using PyTuple_GET_ITEM (we are sure the tuple has at least one
element, we built it, after all...) (many thanks to Scott Leerssen
for reporting the *exact line* for this one.)
2001-12-13 Federico Di Gregorio <fog@debian.org>
* cursor.c: fixed memory leak due to extra strdup (thanks
to Leonardo Rochael Almeida.)
2001-11-14 Federico Di Gregorio <fog@debian.org>
* Release 1.0.
* doc/README: added explanation about guide work in progess but
examples working.
* debian/*: lots of changes to release 1.0 in debian too.
2001-11-12 Federico Di Gregorio <fog@debian.org>
* RELEASE-1.0: added release file, to celebrate 1.0.
* tests/zope/typecheck.zexp: regression test on types for zope.
2001-11-11 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (cast_Interval): removed typecast of interval
into zope DateTime. intervals are reported as strings when using
zope DateTime and as DateTimeDeltas when using mx.
2001-11-09 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): complete rewrite of the
interval parsing code. now we don't use sscanf anymore and all is
done with custom code in a very tight and fast loop.
2001-11-08 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/DA.py (Connection.set_type_casts): added mx INTERVAL
type restore.
* ZPsycopgDA/db.py (DB.query): now we return column names even if
there are no rows in the result set. also, cleaned up a little bit
the code.
2001-11-7 Federico Di Gregorio, <fog@debian.org>
* Makefile.pre.in: fixed small problem with zcat on True64
(thank you stefan.)
2001-11-06 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (DB.query): added fix for concurrent update
from Chris Kratz.
2001-11-05 Federico Di Gregorio <fog@debian.org>
* cursor.c: now we include postgres.h if InvalidOid is still
undefined after all other #includes.
* README: clarified use of configure args related to python
versions.
* aclocal.m4: patched to work with symlinks installations (thanks
to Stuart Bishop.)
* cursor.c (_psyco_curs_execute): now reset the keeper's status to
the old value and not to BEGIN (solve problem with autocommit not
switching back.)
2001-11-01 Federico Di Gregorio <fog@debian.org>
* doc/examples/dt.py: added example on how to use the date and
time constructors.
* Makefile.pre.in (dist-zope): removed dependencies on GNU install
and tar commands. Also a little general cleanup on various targets.
* ZPsycopgDA/DA.py: fixed mx.DateTime importing.
2001-10-31 Federico Di Gregorio <fog@debian.org>
* typemod.c (psyco_xxxFromMx): fixed bug in argument parsing (we
weren't usigng the right type object.)
* aclocal.m4: now builds OPT and LDFLAGS on the values of the env
variables instead of overwriting them.
* Makefile.pre.in (CFLAGS): removed -Wall, you can add it back at
compile time with OPT="-Wall" ./configure ...
* Setup.in (OPT): removed -Wall.
2001-10-30 Michele Comitini <mcm@initd.net>
* module.h: ANSI C compatibility patch from Daniel Plagge.
2001-10-30 Federico Di Gregorio <fog@debian.org>
* README: added common building problems and solutions.
* configure.in: removed check for install command, already done by
james's aclocal.m4 for python. removed install-sh. removed -s from
INSTALLOPTS.
2001-10-29 Federico Di Gregorio <fog@debian.org>
* Makefile.pre.in (dist): removed examples/ directory from
distribution.
* merge with cvs head. preparing to fork again on PSYCOPG-1-0 (i
admit BRANCH_1_0 was quite a silly name.)
* doc/examples/usercast.py: now works.
* connection.c (curs_rollbackall): fixed little bug (exposed by
the deadlock below) by changing KEEPER_READY to KEEPER_READY.
* doc/examples/commit.py: deadlock problem solved, was the
example script, _not_ psycopg. pew... :)
* examples/*: removed the examples moved to doc/examples/.
* doc/examples/commit.py,dictfetch.py: moved from examples/ and
changed to work for 1.0. unfortunately commit.py locks psycopg!!!
2001-10-24 Federico Di Gregorio <fog@debian.org>
* modified all files neede for the 1.0 release.
* configure.in (MXFLAGS): removed electric fence support.
* Makefile.pre.in (dist): now we remove CVS working files before
packing the tarball.
* tests: files in this directory are not coding examples, but
regression tests. we need a sufficient number of tests to follow
every single code path in psycopg at least once. first test is
about datatypes.
* doc/examples: moved new example code to examples directory, old
tests and code samples will stay in examples/ until the manual will
be finished.
2001-10-16 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): completely revised interval
casting code. (psyco_TIME_cast): we use the unix epoch when the
date is undefined.
* cursor.c (psyco_curs_executemany): modified sanity check to
accept sequences of tuples too and not just dictionaries.
2001-10-15 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): fixed bug caused by wrong
parsing on '1 day' (no hours, minutes and seconds.)
2001-10-15 Michele Comitini <mcm@initd.net>
* cursor.c (_execute): use the correct cast functions even on
retrival of binary cursors.
2001-10-12 Federico Di Gregorio <fog@debian.org>
* typemod.c (new_psyco_bufferobject): space not quoted anymore,
smarter formula to calculate realloc size.
* cursor.c (psyco_curs_fetchone): removed static tuple (using
static variable in multithreaded code is *crazy*, why did i do it?
who knows...)
* typeobj.c (psyco_init_types): exports the binary converter (will
be used in cursor.c:_execute.)
* typeobj.h: added export of psyco_binary_cast object.
2001-10-05 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): added missing Py_XDECREF on
casts list.
* Makefile.pre.in (dist): added install-sh file to the
distribution.
* replaced PyMem_DEL with PyObject_Del where necessary.
* connection.c (psyco_conn_destroy): added missing
pthread_mutex_destroy on keeper lock.
2001-10-01 Michele Comitini <mcm@initd.net>
* typemod.c(new_psyco_bufferobject()): using unsigned char for
binary objects to avoid too many chars escaped. A quick and
simple formula to avoid memory wasting and too much reallocating
for the converted object. Needs _testing_, but it is faster.
* cursor.c: #include <postgres.h>
* module.h: now debugging should be active only when asked by
./configure --enable-devel
2001-09-29 Federico Di Gregorio <fog@debian.org>
* cursor.c (new_psyco_cursobject): added locking of connection,
still unsure if necessary.
2001-09-26 Federico Di Gregorio <fog@debian.org>
* configure.in: changed DEBUG into PSYCOTIC_DEBUG, to allow other
includes (postgres.h) to use the former. better compiler checks:
inline, ansi, gcc specific extensions. removed MXMODULE: we don't
need it anymore.
* general #include cleanup, should compile on MacOS X too.
* typeobj.c (psyco_DATE_cast): uses sscanf. should be faster too.
(psyco_TIME_cast): dixit.
* applied patch from Daniel Plagge (SUN cc changes.)
2001-09-22 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py (DB._finish, DB._begin): fix for the
self.db == None problem.
2001-09-19 Michele Comitini <mcm@initd.net>
* typemod.c (new_psyco_bufferobject): better memory managment
(now it allocates only needed space dinamically).
* typeobj.c (psyco_BINARY_cast): ripped a useless check, now
it assumes that binary streams come out from the db correctly
escaped. Should be a lot faster.
2001-09-18 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): fixed interval conversion
(hours were incorrectly converted into seconds.)
2001-09-17 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify_seq, _mogrify_dict): added check for None
value and conversion of None -> NULL (fixes bug reported by Hamish
Lawson.)
2001-09-12 Federico Di Gregorio <fog@debian.org>
* module.c: added handles to new date and time conversion
functions (see below.)
* typemod.c (psyco_XXXFromMx): added conversion functions that
simply wrap the mxDateTime objects instead of creating
them. DBAPI-2.0 extension, off-curse.
2001-09-10 Federico Di Gregorio <fog@debian.org>
* buildtypes.py: solved hidden bug by changing from dictionary to
list, to maintain ordering of types. sometimes (and just
sometimes) the type definitions were printed unsorted, resulting
is psycopg initializing the type system using the type objects in
the wrong order. you were getting float values from an int4
column? be happy, this is now fixed...
* cursor.c (psyco_curs_lastoid): added method to get oid of the
last inserted row (it was sooo easy, it even works...)
2001-09-08 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_INTERVAL_cast): added casting function for the
postgres INTERVAL and TINTERVAL types (create a DateTimeDelta
object.)
2001-09-05 Federico Di Gregorio <fog@debian.org>
* cursor.c: moved all calls to begin_pgconn to a single call in
_psyco_curs_execute, to leave the connection in a not-idle status
after a commit or a rollback. this should free a lot of resources
on the backend side. kudos to the webware-discuss mailing list
members and to Clark C. Evans who suggested a nice solution.
* connection.c (curs_rollbackall, curs_commitall): removed calls
to begin_pgconn, see above.
* module.c (initpsycopg): cleaned up mxDateTime importing; we now
use the right function from mxDateTime.h. Is not necessary anymore
to include our own mx headers. This makes psycopg to depend on
mxDateTime >= 2.0.0.
2001-09-04 Federico Di Gregorio <fog@debian.org>
* doc/*.tex: added documentation directory and skeleton of the
psycopg guide.
2001-09-03 Federico Di Gregorio <fog@debian.org>
* merged in changes from HEAD (mostly mcm fixes to binary
objects.)
* preparing for release 0.99.6.
2001-09-03 Michele Comitini <mcm@initd.net>
* typemod.c: much faster Binary encoding routine.
* typeobj.c: much faster Binary decoding routine.
2001-08-28 Michele Comitini <mcm@initd.net>
* typemod.c: Working binary object to feed data to bytea type
fields.
* typeobj.c: Added BINARY typecast to extract data from
bytea type fields.
* cursor.c: Added handling for SQL binary cursors.
2001-08-3 Michele Comitini <mcm@initd.net>
* cursor.c: fixed DATESTYLE problem thanx to Steve Drees.
2001-07-26 Federico Di Gregorio <fog@debian.org>
* Makefile.pre.in: applied change suggested by Stefan H. Holek to
clobber and distclean targets.
2001-07-23 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py: fixed little bugs exposed by multiple select
changes, not we correctly import ListType and we don't override
the type() function with a variable.
2001-07-17 Federico Di Gregorio <fog@debian.org>
* configure.in: Release 0.99.5.
2001-07-12 Federico Di Gregorio <fog@debian.org>
* debian/* fixed some little packaging problems.
2001-07-11 Federico Di Gregorio <fog@debian.org>
* cursor.c, typeobj.c: removed some Py_INCREF on PyDict_SetItem
keys and values to avoid memory leaks.
2001-07-03 Federico Di Gregorio <fog@debian.org>
* cursor.c (_mogrify_dict): added dictionary mogrification: all
Strings in the dictionary are translated into QuotedStrings. it
even works... (_mogrify_seq): added sequence mogrification and
code to automagically mogrify all strings passed to .execute().
2001-07-02 Federico Di Gregorio <fog@debian.org>
* Release 0.99.4.
* typemod.c: added QuotedString class and methods.
* module.c: added QuotedString method to module psycopg.
* typemod.c: changed Binary objects into something usefull. now
the buffer object quotes the input by translatin every char into
its octal representation. this consumes 4x memory but guarantees
that even binary data containing '\0' can go into the Binary
object.
* typemod.h: added definition of QuotedString object.
2001-06-28 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py, ZPsycopgDA/DABase.py: applied patch sent by
yury to fix little buglet.
2001-06-22 Federico Di Gregorio <fog@debian.org>
* Release 0.99.3.
* connection.c (new_psyco_connobject): now we strdup dsn, as a fix
for the problem reported by Jack Moffitt.
* Ok, this will be the stable branch from now on...
* Merged in stuff from 0.99.3. About to re-branch with a better
name (BRANCH_1_0)
2001-06-20 Federico Di Gregorio <fog@debian.org>
* Release 0.99.3. Showstoppers for 1.0 are:
- documentation
- mxDateTime module loading
- bug reported by Yury.
* Integrated patches from Michele:
- searching for libcrypt in configure now works
- removed memory leak in asprintf.c
2001-06-15 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/__init__.py (initialize): applied patch from Jelle to
resolve problem with Zope 2.4.0a1.
2001-06-14 Federico Di Gregorio <fog@debian.org>
* configure.in: added code to check for missing functions (only
asprintf at now.)
* asprintf.c: added compatibility code for oses that does not have
the asprintf() function.
2001-06-10 Federico Di Gregorio <fog@debian.org>
* Branched PSYCOPG_0_99_3. Development will continue on the cvs
HEAD, final adjustements and bugfixing should go to this newly
created branch.
2001-06-08 Michele Comitini <mcm@initd.net>
* ZPsycopgDA/DA.py: DateTime casts simplified and corrected
as suggested by Yury.
2001-06-05 Federico Di Gregorio <fog@debian.org>
* Release 0.99.2.
* Makefile.pre.in (dist): added typemod.h and typemod.c to
distribution.
* cursor.c (commit_pgconn, abort_pgconn, begin_pgconn): resolved
segfault reported by Andre by changing PyErr_SetString invokations
into pgconn_set_critical. the problem was that the python
interpreter simply segfaults when we touch its internal data (like
exception message) inside an ALLOW_THREADS wrapper.
* now that we are 100% DBAPI-2.0 compliant is time for the
one-dot-o release (at last!) Para-pa-pa! This one is tagged
PSYCOPG_0_99_1 but you can call it 1.0pre1, if you better like.
(A very long text just to say 'Release 0.99.1')
* typemod.[ch]: to reach complete DBAPI-2.0 compliance we
introduce some new objects returned by the constructors Date(),
Time(), Binary(), etc. Those objects are module-to-database only,
the type system still takes care of the database-to-python
conversion.
2001-06-01 Federico Di Gregorio <fog@debian.org>
* Release 0.5.5.
* module.h: better error message when trying to commit on a
cursor derived from serialized connection.
* ZPsycopgDA/db.py (DB.close): now self.cursor is set to None when
the connection is closed.
* module.c (initpsycopg): added missing (sic) DBAPI module
parameters (paramstyle, apilevel, threadsafety, etc...)
2001-05-24 Michele Comitini <mcm@initd.net>
* ZPsycopgDA: Support for Zope's internal DateTime, option
to leave mxDateTime is available on the management interface so
to switch with little effort :).
* cursor.c: more aggressive cleanup of postgres results
to avoid the risk of memory leaking.
* typeobj.c, connection.c: deleted some Py_INCREF which
wasted memory.
2001-05-18 Federico Di Gregorio <fog@debian.org>
* Release 0.5.4.
2001-05-17 Michele Comitini <mcm@initd.net>
* ZPsycopgDA/db.py: The connection closed by the management
interface of zope now raises error instead of reopening itself.
* cursor.c (psyco_curs_close): does not try to free the cursor
list, as it caused a segfault on subsequent operations on the same
cursor.
2001-05-07 Federico Di Gregorio <fog@debian.org>
* Release 0.5.3.
* Merged in changes from me and mcm.
2001-05-06 Michele Comitini <mcm@initd.net>
* ZPsycopgDA/db.py (DB.close): Fixes a bug report by Andre
Shubert, which was still open since there was a tiny typo in
method definition.
* ZPsycopgDA/DA.py (Connection.sql_quote__): overriding standard
sql_quote__ method to provide correct quoting (thank to Philip
Mayers and Casey Duncan for this bug report).
2001-05-04 Federico Di Gregorio <fog@debian.org>
* ZPsycopgDA/db.py: added .close() method (as suffested by Andre
Schubert.)
2001-05-04 Michele Comitini <mcm@initd.net>
* module.h: working on a closed object now raises an
InterfaceError.
* ZPsycopgDA/db.py: fixed problems with dead connections detection.
* ZPsycopgDA/__init__.py: corrected SOFTWARE_HOME bug for zope
icon.
2001-05-04 Federico Di Gregorio <fog@debian.org>
* examples/thread_test.py: now that the serialization bug is
fixed, it is clear that thread_test.py is bugged! added a commit()
after the creation of the first table to avoid loosing it on the
exception raised by the CREATE of an existing table_b.
2001-05-03 Federico Di Gregorio <fog@debian.org>
* connection.c (psyco_conn_cursor): reverted to old locking
policy, the new caused a nasty deadlock. apparently the multiple
connection problem has been solved as a side-effect of the other
fixes... (?!)
* module.h: removes stdkeeper field from connobject, we don't need
it anymore.
* cursor.c (dispose_pgconn): now sets self->keeper to NULL to
avoid decrementing the keeper refcnt two times when the cursor is
first closed and then destroyed.
* connection.c (psyco_conn_cursor): fixed little bug in cursor
creation: now the connection is locked for the entire duration of
the cursor creation, to avoid a new cursor to be created with a
new keeper due to a delay in assigning the stdmanager cursor.
* cursor.c: added calls to pgconn_set_critical() and to
EXC_IFCRITICAL() where we expect problems. Still segfaults but at
least raise an exception...
* cursor.c (psyco_curs_autocommit): added exception if the
cursor's keeper is shared between more than 1 cursor.
* module.h (EXC_IFCRITICAL): added this macro that call
pgconn_resolve_critical) on critical errors.
* cursor.c (alloc_keeper): added check for pgres == NULL.
* cursor.c (psyco_curs_destroy): merged psyco_curs_destroy() and
psyco_curs_close(): now both call _psyco_curs_close() and destroy
does only some extra cleanup.
2001-05-03 Michele Comitini <mcm@initd.net>
* ZPsycopgDA/db.py: Some cleanup to bring the zope product up to
date with the python module. Some bugs found thanks to Andre
Schubert. Now the ZDA should rely on the new serialized version
of psycopg.
* cursor.c: while looking for problems in the ZDA some come out
here, with the inability to handle dropping connection correctly.
This leads to segfaults and is not fixed yet for lack of time.
Some problems found in cursors not willing to share the same
connection even if they should. Hopefully it should be fixed
soon.
2001-04-26 Federico Di Gregorio <fog@debian.org>
* fixed bug reported by Andre Schubert by adding a new cast
function for long integers (int8 postgresql type.) at now they are
converted to python LongIntegers: not sure f simply convert to
floats.
* michele applied patch from Ivo van der Wijk to make zpsycopgda
behave better when INSTANCE_HOME != SOFTWARE_HOME.
* cursor.c (_psyco_curs_execute): also fill the 'columns' field.
* module.h: added a 'columns' field to cursobject, to better
support the new dictionary fetch functions (dictfetchone(),
dictfetchmany(), dictfetchall().)
* cursor.c: added the afore-mentioned functions (function names
are not definitive, they will follow decisions on the DBAPI SIG.)
2001-04-03 Federico Di Gregorio <fog@debian.org>
* Release 0.5.1.
* mcm fixed a nasty bug by correcting a typo in module.h.
2001-03-30 Federico Di Gregorio <fog@debian.org>
* module.c (psyco_connect): added `serialized' named argument to
the .connect() method (takes 1 or 0 and initialize the connection
to the right serialization state.)
* Makefile.pre.in (dist): fixed little bug, a missing -f argument
to rm.
* examples/thread_test.py: removed all extension cruft.
* examples/thread_test_x.py: this one uses extensions like the
per-cursor commit, autocommit, etc.
* README (psycopg): added explanation on how .serialize() works.
* connection.c (psyco_conn_serialize): added cursor serialization
and .serialize() method on the connection object. now we are
definitely DBAPI-2.0 compliant.
2001-03-20 Federico Di Gregorio <fog@debian.org>
* cursor.c (_psyco_curs_execute): replaced some fields in
description with None, as suggested on the DB-SIG ML.
* something like one hundred of little changes to allow cursors
share the same postgres connection. added connkeeper object and
pthread mutexes (both in connobject and connkeeper.) apparently it
works. this one will be 0.5.0, i think.
2001-03-19 Michele Comitini <mcm@initd.net>
* cursor.c: added mutexes, they do not interact well with python
threads :(.
2001-03-16 Michele Comitini <mcm@initd.net>
* ZPsycopgDA/db.py (ZDA): some fixes in table browsing.
2001-03-16 Federico Di Gregorio <fog@debian.org>
* suite/tables.postgresql (TABLE_DESCRIPTIONS): fixed some typos
introduced by copying by hand the type values from pg_type.h.
* suite/*: added some (badly) structured code to test for
DBAPI-2.0 compliance.
* cursor.c (pgconn_notice_callback): now the NOTICE processor only
prints NOTICEs when psycopg has been compiled with the
--enable-devel switch.
* connection.c: removed 'autocommit' attribute, now is a method as
specified in the DBAPI-2.0 document.
2001-03-15 Federico Di Gregorio <fog@debian.org>
* connection.c (curs_commitall): splitted for cycle in two to
avoid the "bad snapshot" problem.
2001-03-14 Federico Di Gregorio <fog@debian.org>
* Release 0.4.6.
* cursor.c (_psyco_curs_execute): fixed nasty bug, there was an
free(query) left from before the execute/callproc split.
* Preparing for 0.4.6.
2001-03-13 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_execute): fixed some memory leaks in
argument parsing (the query string was not free()ed.)
(psyco_curs_callproc): implemented callproc() method on cursors.
(_psyco_curs_execute): this is the function that does the real
stuff for callproc() and execute().
(pgconn_notice_*): added translation of notices into python
exceptions (do we really want that?)
* configure.in: removed some cruft (old comments and strncasecmp()
check)
2001-03-12 Federico Di Gregorio <fog@debian.org>
* examples/thread_test.py: added moronic argument parsing: now you
can give the dsn string on the command line... :(
* Release 0.4.5.
2001-03-10 Federico Di Gregorio <fog@debian.org>
* cursor.c (request_pgconn): added code to set datestyle to ISO on
new connections (many thanks to Yury <yura@vpcit.ru> for the code,
i changed it just a little bit to raise an exception on error.)
2001-03-09 Federico Di Gregorio <fog@debian.org>
* Release 0.4.4.
* ZPsycopgDA/db.py: michele fixed a nasty bug here.
2001-03-08 Federico Di Gregorio <fog@debian.org>
* Release 0.4.3.
2001-03-07 Federico Di Gregorio <fog@debian.org>
* Makefile.pre.in (dist): typeobj_builtins.c included for people
without pg_type.h. if you encounter type-casting problems like
results cast to the wrong type, simply "rm typeobj_builtins.c" and
rebuild.
* typeobj.c (psyco_*_cast): removed RETURNIFNULL() macro from all
the builtin casting functions. (psyco_STRING_cast) does not create
a new string anymore, simply Py_INCREF its argument and return it.
* cursor.c (psyco_curs_fetchone): removed strdup() call. added
PQgetisnull() test to differentiate between real NULLs and empty
strings.
* Removed cursor.py (mcm, put tests in examples) and fixed some
typos in the dtml code.
2001-03-04 Michele Comitini <mcm@initd.net>
* examples/commit_test.py: Modifications to test argument passing
and string substitution to cursor functions, nothing more.
* ZPsycopgDA/db.py: now it exploits some of the good features of
the psycopg driver, such as connection reusage and type
comparison. Code is smaller although it handles (and
reports) errors much better.
* cursor.c: corrected a bug that left a closed cursor in the
cursor list of the connection. Now cursors are removed from the
lists either when they are close or when they are destroyed.
Better connection (TCP) error reporting and handling.
2001-03-02 Federico Di Gregorio <fog@debian.org>
* examples commit_test.py: added code to test autocommit.
* examples/thread_test.py (ab_select): modified select thread to
test autocommit mode.
* Release 0.4.1.
* module.h, connection.c, cursor.c: added autocommit support.
2001-02-28 Federico Di Gregorio <fog@debian.org>
* Release 0.4.
2001-02-27 Michele Comitini <mcm@initd.net>
* cursor.py: cut some unuseful code in psyco_curs_fetchmany() and
psyco_curs_fetchall() inserted an assert in case someting goes
wrong.
2001-02-27 Federico Di Gregorio <fog@debian.org>
* debian/*: various changes to build both the python module and
the zope db adapter in different packages (respectively
python-psycopg and zope-psycopgda.)
* examples/type_test.py: better and more modular tests.
* typeobj.c: added DATE, TIME, DATETIME, BOOLEAN, BINARY and ROWID
types. (RETURNIFNULL) added NULL-test to builtin conversion
functions (using the RETURNIFNULL macro.)
2001-02-26 Federico Di Gregorio <fog@debian.org>
* releasing 0.3 (added NEWS file.)
2001-02-26 Michele Comitini <mcm@initd.net>
* cursor.c: fetchmany() some cleanup done.
* ZPsycopgDA/db.py, ZPsycopgDA/__init__.py, : fixes to make the
ZDA work some way. WARNING WARNING WARNING the zda is still
alpha code, but we need some feed back on it so please give it
a try.
2001-02-26 Federico Di Gregorio <fog@debian.org>
* typeobj.c (psyco_STRING_cast): fixed bad bad bad bug. we
returned the string without coping it and the type-system was more
than happy to Py_DECREF() it and trash the whole system. fixed at
last!
* module.h (Dprintf): added pid to every Dprintf() call, to
facilitate multi-threaded debug.
2001-02-26 Michele Comitini <mcm@initd.net>
* module.c: added code so that DateTime package need not to be
loaded to have mxDateTime. This should avoid clashing with
DateTime from the zope distribution.
* cursor.c: setting error message in fetchmany when no more tuples
are left. This has to be fixed in fetch and fetchall to.
2001-02-26 Federico Di Gregorio <fog@debian.org>
* configure.in: stepped up version to 0.3, ready to release
tomorrow morning. added check for path to DateTime module.
* examples/usercast_test.py: generate some random boxes and
points, select the boxes with at least one point inside and print
them converting the PostgeSQL output using a user-specified cast
object. nice.
2001-02-24 Federico Di Gregorio <fog@debian.org>
* cursor.c (psyco_curs_fetchone): now an error in the python
callback when typecasting results raise the correct exception.
* typeobj.c (psyco_DBAPITypeObject_call): removed extra Py_INCREF().
2001-02-23 Federico Di Gregorio <fog@debian.org>
* replaced every single instance of the string 'pgpy' with 'psyco'
(this was part of the general cleanup.)
* type_test.py: added this little test program to the distribution
(use the new_type() method to create new instances of the type
objects.)
* typeobj.c: general cleanup. fixed some bugs related to
refcounting (again!)
* cursor.c: general cleanup. (request_pgconn) simplified by adding
a support function (_extract_pgconn.)
* connection.c: general cleanup. replaced some ifs with asserts()
in utility functions when errors depend on programming errors and
not on runtime exceptions. (pgpy_conn_destroy) fixed little bug
when deleting available connections from the list.
* module.h: general cleanup.
* typeobj.h: general cleanup, better comments, made some function
declarations extern.
* module.c: general cleanup, double-checked every function for
memory leaks. (pgpy_connect) removed unused variable 'connection'.
2001-02-22 Federico Di Gregorio <fog@debian.org>
* typeobj.c: fixed lots of bugs, added NUMBER type object. now the
basic tests in type_test.py work pretty well.
* cursor.c (pgpy_curs_fetchmany): fixed little bug, fetchmany()
reported one less row than available.
* fixed lots of bugs in typeobj.c, typeobj.h, cursor.c. apparently
now the type system works. it is time to clean up things a little
bit.
2001-02-21 Federico Di Gregorio <fog@debian.org>
* typeobj.c: separated type objects stuff from module.c
* typeobj.h: separated type objects stuff from module.h
2001-02-19 Federico Di Gregorio <fog@debian.org>
* cursor.c (pgpy_curs_fetchmany): now check size and adjust it to
be lesser or equal than the nuber of available rows.
2001-02-18 Michele Comitini <mcm@initd.net>
* module.c, module.h: added optional args maxconn and minconn to
connection functions
* cursor.c: better error checking in request_pgconn.
* connection.c: changed new_connect_obj to take as optional args
maxconn and minconn. Added the corresponding ro attributes to
connection objects.
* cursor.py: added some code to stress test cursor reusage.
* cursor.c: some fixes on closed cursors.
* connection.c: corrections on some assert calls.
2001-02-16 Federico Di Gregorio <fog@debian.org>
* configure.in: added --enable-priofile sqitch. changed VERSION to
0.2: preparing for a new release.
* cursor.c: added a couple of asserts.
2001-02-16 Michele Comitini <mcm@initd.net>
* cursor.c, connection.c: fixed the assert problem: assert must
take just the value to be tested! no assignemente must be done in
the argument of assert() otherwise is wiped when NDEBUG is set.
* module.h: some syntax error fixed. Error in allocating a tuple
corrected in macro DBAPITypeObject_NEW().
* module.c: pgpy_DBAPITypeObject_init() is not declared static anymore.
* cursor.c: executemany() now does not create and destroy tuples
for each list item, so it is much faster.
2001-02-14 Michele Comitini <mcm@initd.net>
* cursor.c: added again Py_DECREF on the cpcon after disposing
it. assert() with -DNDEBUG makes the driver segfault while it
should not.
2001-02-13 Federico Di Gregorio <fog@debian.org>
* some of the memory leak were memprof errors, bleah. resumed some
old code, fixed segfault, fixed other bugs, improved speed. almost
ready for a new release.
* connection.c (pgpy_conn_destroy): replaced some impossible ifs
with aseert()s.
* cursor.c (pgpy_curs_close): added Py_DECREF() to
self->descritpion to prevent a memory leak after an execute().
* connection.c (pgpy_conn_destroy): always access first element of
lists inside for cycles because removing items from the list makes
higher indices invalid.
* cursor.c (dispose_pgconn): fixed memory leak, there was a
missing Py_DECREF() after the addition of the C object wrapping
the postgresql connection to the list of available connections.
* cursor.c (dispose_pgconn): fixed another memory leak: an
orphaned cursor should call PQfinish() on its postgresql
connection because it has no python connection to give the
postgresql ine back.
* cursor.c (pgpy_curs_execute): added Py_DECREF() of description
tuple after adding it to self->description. this one fixes the
execute() memory leak.
* cursor.c (pgpy_curs_fetchall): added missing Py_DECREF() on row
data (obtained from fetchone().) this fixes the last memory leak.
(thread_test.py now runs without leaking memory!)
2001-02-12 Federico Di Gregorio <fog@debian.org>
* INSTALL: removed wok cruft from head of this file.
* debian/rules: debianized the sources. python-psycopg is about to
enter debian. mxDateTime header locally included until the
maintainer of python-mxdatetime includes them in his package
(where they do belong.)
* autogen.sh: added option --dont-run-configure.
2001-02-09 Federico Di Gregorio <fog@debian.org>
* module.c (initpsycopg): changed name of init function to match
new module name (also changed all the exception definitions.)
* README: updated psycopg description (we have a new name!)
* Ready for 0.1 release.
2001-02-07 Michele Comitini <mcm@initd.net>
* cursor.c: now executemany takes sequences and not just
tuples
2001-02-07 Federico Di Gregorio <fog@debian.org>
* Makefile.pre.in: now dist target includes test programs
(thread_test.py) and README and INSTALL files.
* configure.in: changed --with-devel to --enable-devel. little
cosmetical fixes to the option management.
* connection.c, module.c, cursor.c, module.h: removed 'postgres/'
from #include directive. it is ./configure task to find the right
directory.
* thread_test.py: added thread testing program.
2001-02-07 Michele Comitini <mcm@initd.net>
* cursor.c: added code to allow threads during PQexec() calls.
* cursor.c: added begin_pgconn to rollback() and commit()
so that the cursror is not in autocommit mode.
* cursor.c: added rollback() and commit() methods to cursor
objects.
2001-02-07 Federico Di Gregorio <fog@debian.org>
* connection.c (pgpy_conn_destroy): always delete item at index
0 and not i (because items shift in the list while deleting and
accessing items at len(list)/2 segfaults.)
2001-02-07 Michele Comitini <mcm@initd.net>
* connection.c: added some more checking to avoid
clearing of already cleared pgresults. Calling curs_closall()
in conn_destroy() since cursors have to live even without
their parent connection, otherwise explicit deletion of
object referencing to those cursors can cause arbitrary code
to be executed.
* cursor.c: some more checking to avoid trying to close
already close pgconnections.
2001-02-06 Federico Di Gregorio <fog@debian.org>
* Makefile.pre.in (CFLAGS): added -Wall to catch bad programming
habits.
* cursor.c, connection.c: lots of fixes to the destroy stuff. now
all the cursor are destroyed *before* the connection goes away.
* cursor.c (request_pgconn): another idiot error done by not
replacing dsn with owner_conn->dsn. fixed.
(dispose_pgconn): commented if to guarantee that the connection is
returned to the pool of available connections.
* merged changes done by mcm.
* cursor.c: general cleanup and better debugging/error
messages. changed xxx_conn into xxx_pgconn where still
missing. some pretty big changes to the way pgconn_request()
allocates new connections.
* connection.c: removed all 'register' integers. obsolete, gcc
does a much better job optimizing cycles than a programmer
specifying how to use registers.
* module.h: some general cleanup and better definition of DPrintf
macro. now the DEBUG variable can be specified at configure time by
the --with-devel switch to ./configure.
2001-02-02 Michele Comitini <mcm@initd.net>
* cursor.c (Repository): Added functions for managing a connection
pool. Segfaults.
* configure.in (Repository): removed check for mxdatetime headers.
2001-01-24 Federico Di Gregorio <fog@debian.org>
* first checkout from shinning new init.d cvs.
* autotoolized build system. note that the mx headers are missing
from the cvs, you should get them someplace else (this is the
right way to do it, just require the headers in the configure
script.)
2001-01-21 Michele Comitini <mcm@initd.net>
* cursor.c (Repository): commit, abort, begin functions now check
the right exit status of the command.
* connection.c (Repository): working commit() and rollback()
methods.
2001-01-20 Michele Comitini <mcm@initd.net>
* module.h (Repository): added member to cursor struct to handle
queries without output tuples.
* cursor.c (Repository): new working methods: executemany,
fetchone, fetchmany, fetchall.
2001-01-18 Michele Comitini <mcm@initd.net>
* cursor.c (Repository): close working. destroy calling close.
close frees pg structures correctly.
* connection.c (Repository): close method working. destroy seems
working.
2001-01-17 Michele Comitini <mcm@initd.net>
* cursor.c (Repository): now each python cursor has its own
connection. Each cursor works in a transaction block.
* connection.c (Repository): added cursor list to connection
object
2001-01-14 Michele Comitini <mcm@initd.net>
* cursor.c (Repository): Beginning of code to implement cursor
functionalities as specified in DBA API 2.0, through the use of
transactions not cursors.
* connection.c (Repository): Added some error checking code for pg
connection (will be moved to cursor?).
2001-01-13 Michele Comitini <mcm@initd.net>
* connection.c (Repository): Added error checking in connection
code to fail if connection to the db could not be opened.
* module.h (Repository): New macro to help creating
DBAPITypeObjects.
* module.c (Repository): DBAPITypeObject __cmp__ function is now
very simplified using recursion.
* module.h (Repository): "DBAPIObject" changed to
"DBAPITypeObject".
* module.c (Repository): Fixes for coerce function of DBAPIObjects
by Federico Di Gregorio <fog@initd.net>.
(Repository): Clean up and better naming for DBAPITypeObjects.
2001-01-08 Michele Comitini <mcm@initd.net>
* module.c (Repository): Corrected the exception hierarcy
* connection.c (Repository): Begun to use the connection objects
of libpq
2001-01-07 Michele Comitini <mcm@initd.net>
* module.c (Repository): Added the Date/Time functions.
2001-01-06 Michele Comitini <mcm@initd.net>
* cursor.c (Repository): Skeleton of cursor interface. All
methods and attributes of cursor objects are now available
in python. They do nothing now.
2001-01-05 Michele Comitini <mcm@initd.net>
* module.c (Repository): Test version; module loaded with
exception defined.
2001-01-05 Michele Comitini <mcm@initd.net>
* Setup.in (Repository): Setup file.
* Makefile.pre.in (Repository): from the python source.
2001-01-05 Michele Comitini <mcm@initd.net>
* module.c: Written some code for defining exceptions.
* module.h: Static variable for exceptions.
2001-01-04 Michele Comitini <mcm@initd.net>
* Changelog: pre-release just a few prototypes to get started.
|