You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(52) |
Oct
(21) |
Nov
(10) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(3) |
Feb
(7) |
Mar
|
Apr
(8) |
May
(1) |
Jun
(6) |
Jul
(4) |
Aug
(4) |
Sep
(18) |
Oct
(26) |
Nov
(7) |
Dec
(25) |
2003 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(10) |
Jul
(10) |
Aug
|
Sep
|
Oct
(5) |
Nov
(2) |
Dec
(2) |
2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
(1) |
Mar
(8) |
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Gerhard H?r. <gha...@us...> - 2002-10-27 05:18:02
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv8711 Modified Files: Announce Log Message: 27OCT2002 gh Wrote the announcement for 2.3 beta 1. Index: Announce =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/Announce,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Announce 8 Sep 2002 16:17:51 -0000 1.18 --- Announce 27 Oct 2002 05:10:43 -0000 1.19 *************** *** 1,37 **** ! Announce: pyPgSQL - Version 2.2 is released. =========================================================================== ! pyPgSQL v2.2 has been released. It is a bug fix release to version 2.1. It is available at http://pypgsql.sourceforge.net. pyPgSQL is a package of two (2) modules that provide a Python DB-API 2.0 ! compliant interface to PostgreSQL databases. The first module, libpq, ! exports the PostgreSQL C API to Python. This module is written in C and ! can be compiled into Python or can be dynamically loaded on demand. The ! second module, PgSQL, provides the DB-API 2.0 compliant interface and ! support for various PostgreSQL data types, such as INT8, NUMERIC, MONEY, ! BOOL, ARRAYS, etc. This module is written in Python and works with ! PostgreSQL 7.0 or later and Python 2.0 or later. ! Note: It is highly recommended that you use PostgreSQL 7.1 or later and ! Python 2.1 or later. ! PostgreSQL is a sophisticated Object-Relational DBMS, supporting almost all ! SQL constructs, including sub-selects, transactions, and user-defined types ! and functions. It is the most advanced open-source database available any- ! where More information about PostgreSQL can be found at the PostgreSQL home ! page at http://www.postgresql.org. ! Python is an interpreted, interactive, object-oriented programming lang- ! uage. It combines remarkable power with very clear syntax. It has mod- ! ules, classes, exceptions, very high level dynamic data types, and dynamic ! typing. There are interfaces to many system calls and libraries, as well ! as to various windowing systems (X11, Motif, Tk, Mac, MFC). New builtin ! modules are easily written in C or C++. Python is also usable as an exten- ! sion language for applications that need a programmable interface. Python ! is copyrighted but freely usable and distributable, even for commercial ! use. More information about Python can be found on the Python home page at ! http://www.python.org. --------------------------------------------------------------------------- --- 1,69 ---- ! Announce: pyPgSQL - Version 2.3 beta 1 is released. =========================================================================== ! pyPgSQL v2.3 beta 1 has been released. It is available at http://pypgsql.sourceforge.net. pyPgSQL is a package of two (2) modules that provide a Python DB-API 2.0 ! compliant interface to PostgreSQL databases. The first module, libpq, is ! written in C and exports the PostgreSQL C API to Python. The second module, ! PgSQL, provides the DB-API 2.0 compliant interface and support for various ! PostgreSQL data types, such as INT8, NUMERIC, MONEY, BOOL, ARRAYS, etc. This ! module is written in Python and works with PostgreSQL 7.0 or later and Python ! 2.0 or later. ! It was tested with PostgreSQL 7.0.3, 7.1.3, 7.2.2, 7.3 beta 2, Python 2.0.1, ! 2.1.3 and 2.2.2. ! Note: It is highly recommended that you use PostgreSQL 7.1 or later and Python ! 2.1 or later. If you want to use PostgreSQL Large Objects under Python 2.2.x, ! you *must* use Python 2.2.2, because of a bug in earlier 2.2 versions. ! Project homepages: ! pyPgSQL: http://pypgsql.sourceforge.net/ ! PostgreSQL: http://www.postgresql.org/ ! Python: http://www.python.org/ ! ! This is the first time we release a beta of pyPgSQL. While there didn't change ! much under the hood, the build process was completely rewritten, so pyPgSQL ! should now build out of the box on most popular platforms. For you, this means ! that a "python setup.py build" will now hopefully just work. And for us, this ! means we'll have to answer less boring support questions :-) ! ! These platforms were tested and will build out of the box (of course, more ! testing won't hurt): UnixWare 7/OpenUNIX 8, Windows native, Cgwin, FreeBSD ! 4.7, Redhat Linux 7.3, SuSE Linux 7.3, Debian Linux 3.0. ! ! The build process is also designed to work with these platforms, but they ! could not be tested in real life (please do so, if you can!): Mandrake ! Linux, NetBSD, OpenBSD, MacOS X. ! ! If your platform isn't supported out of the box, you can edit a ! setup.config file to configure the build process. Patches for supporting ! additional platforms are more than welcome. Look into setup.py for how to ! do it. ! ! The other big change is that Gerhard finally gave up on getting more feedback ! on his Unicode patch and merged it into the pyPgSQL 2.x line. Hey, if it did ! work for Linux 2.4, it can work for us, too <0.7 wink>. ! ! Using Unicode works like this: ! ! from pyPgSQL import PgSQL ! con = PgSQL.connect(client_encoding=("utf-8", "ignore"), unicode_results=1) ! ! # where client_encoding are the parameters you normally give to the encode ! # method of a Unicode string. unicode_results=1 means pyPgSQL will return ! # VARCHAR/CHAR/TEXT fields as Unicode strings instead of byte strings. ! ! # As I refuse to do any magic, you'll also have to set the client encoding ! # for the database manually: ! cursor = con.cursor() ! cursor.execute("SET CLIENT_ENCODING TO UNICODE") ! ! # There are other ways to set the client encoding, including setting a ! # special environment variable (see PostgreSQL manual), but I recommend ! # doing it in code. --------------------------------------------------------------------------- *************** *** 39,82 **** =========================================================================== ! Changes since pyPgSQL Version 2.1 ================================= ! The following source code files were added to Version 2.2 of pyPgSQL: ! pyPgSQL.spec - RPM spec file, contributed by Sean Reifschneider. Changes to README ----------------- ! * Added note about case-insensitiveness of column access in PgResultSet. Changes to PgSQL.py ------------------- ! * Fixed various problems with the PgResultSet: Column (attribute and ! dictionary) access is now case-insensitive. A __contains__ method was added ! and the __setattr__ method was fixed. The get method got an optional default ! value parameter. ! * Fixed various problems with the PgNumeric type: ! - Added code to allow a float as an argument to the PgNumeric constructor. ! - You can now change the precision/scale of a PgNumeric by: ! a = PgNumeric(pgnumeric, new prec, new scale). ! This can be used to 'cast' a PgNumeric to the proper precision and scale ! before storing it in a field. ! - The arithmatic routines (__add__, __radd__, etc) now ensure that the ! arguments are properly coerced to the correct types. ! - Added support for the augmented arithmetic operations (__iadd__, etc). ! - The math routines would lose precision because the precision/ scale were ! set to be the same as the first operand. This is no longer the case all ! precision is retained for the +, -, and * operations. ! * Fixed problem that occurs when a query on an OID field doesn't return any ! rows. [Bug #589370]. ! * Applied patch #569203 and also added __pos__ and __abs__ special methods to ! PgNumeric. ! * Ensure proper SQL-quoting of long ints. ! Changes to PgSQLTestcases.py ! ---------------------------- ! * 14 new tests, mostly for PgNumeric and PgResultSet. --- 71,151 ---- =========================================================================== ! Changes since pyPgSQL Version 2.2 ================================= ! The following source code files were added to Version 2.3 beta 1 of pyPgSQL: ! setup.config - Part of the changed distutils-based build process. ! If you want to customize the build process (change ! include and library directories, for example, you ! only need to edit this file; setup.py should not be ! edited directly any longer) ! ! unicode_tests.py - Test suite for the new Unicode support. Merged from ! the Unicode patch. ! ! Changes to setup.py ! ------------------- ! * This file was rewritten entirely so that pyPgSQL now builds out of the box ! on Windows, Cygwin, Debian Linux, Redhat Linux, SuSE Linux, FreeBSD, ! UnixWare 7 and OpenUNIX 8. These are the platforms the new build process has ! been tested on. Untested support is available for Mandrake Linux, NetBSD, ! OpenBSD and MacOS X. Changes to README ----------------- ! * Updates for 2.3b1. ! * Converted the whole document into reStructuredText, so we ! can easily built a HTML version using docutils (http://docutils.sf.net/). ! ! Changes to README.win32 ! ----------------------- ! * Remove out of date warning about PostgreSQL on win32 ! * Reflected change from windows/ to ports/ Changes to PgSQL.py ------------------- ! * Merged the Unicode patch. pyPgSQL now has full Unicode support. ! * Added support for the INTERVAL type. ! * mxDateTime 1.x is no longer supported. Require mxDateTime 2.x and give ! useful error message if import fails. ! * Cosmetic changes: use cmp builtin where appropriate. ! * Fixed typo where PgTypes.__str__ was spelled incorrectly; compare to None ! using "is" operator. ! * Take into account that libpq.PgInt8Type might not be ! available. ! * Convert ROWID to PgInt8 instead of PgInt4 (the original behaviour led to ! overflow errors.) ! * Always set the displaysize field of cursor.description to -1. ! PostgreSQL 7.3 doesn't provide this information any more and it's pretty ! useless nowadays that we've mostly left line printers beyond us. ! Changes to pyPgSQL/__init__.py ! ------------------------------ ! * Register libpq.PgInt8 with copy_reg only if available. ! Changes to pglargeobject.c ! -------------------------- ! * Made the 'closed' attribute of PgLargeObject an int instead of a ! long. ! Changes to libpqmodule.c: ! ------------------------- ! * Fixed the format string of ParseTuple in libPQbool_FromInt. ! This closes a bug that appeared on Linux/Alpha (#625121). ! ! Changes to PgSQLTestcases: ! -------------------------- ! * Don't check for the obsolete displaysize field in ! cursor.description. Also don't check the backend encoding. ! Multiple files ! -------------- ! The windows/ directory has been moved to a port/ directory. Now we *always* ! use our own version of various string versions instead of special casing for a ! dozen different Windows and Unix platforms. ! In order to get the C version of PgInt8Type, it is now required that the ! constants LLONG_MAX, LLONG_MIN, ULLONG_MAX and ULLONG_MIN are defined when ! including limits.h and that including Python.h defines HAVE_LONG_LONG. ! Otherwise, a Python class is used instead. |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 04:27:39
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv17874 Modified Files: ChangeLog Log Message: 27OCT2002 gh Changelog for version 2.3 beta 1. Index: ChangeLog =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/ChangeLog,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ChangeLog 8 Sep 2002 16:18:30 -0000 1.16 --- ChangeLog 27 Oct 2002 04:27:35 -0000 1.17 *************** *** 1,4 **** --- 1,84 ---- #ident "$Id$" + Changes since pyPgSQL Version 2.2 + ================================= + + The following source code files were added to Version 2.3 beta 1 of pyPgSQL: + + setup.config - Part of the changed distutils-based build process. + If you want to customize the build process (change + include and library directories, for example, you + only need to edit this file; setup.py should not be + edited directly any longer) + + unicode_tests.py - Test suite for the new Unicode support. Merged from + the Unicode patch. + + Changes to setup.py + ------------------- + * This file was rewritten entirely so that pyPgSQL now builds out of the box + on Windows, Cygwin, Debian Linux, Redhat Linux, SuSE Linux, FreeBSD, + UnixWare 7 and OpenUNIX 8. These are the platforms the new build process has + been tested on. Untested support is available for Mandrake Linux, NetBSD, + OpenBSD and MacOS X. + + Changes to README + ----------------- + * Updates for 2.3b1. + * Converted the whole document into reStructuredText, so we + can easily built a HTML version using docutils (http://docutils.sf.net/). + + Changes to README.win32 + ----------------------- + * Remove out of date warning about PostgreSQL on win32 + * Reflected change from windows/ to ports/ + + Changes to PgSQL.py + ------------------- + * Merged the Unicode patch. pyPgSQL now has full Unicode support. + * Added support for the INTERVAL type. + * mxDateTime 1.x is no longer supported. Require mxDateTime 2.x and give + useful error message if import fails. + * Cosmetic changes: use cmp builtin where appropriate. + * Fixed typo where PgTypes.__str__ was spelled incorrectly; compare to None + using "is" operator. + * Take into account that libpq.PgInt8Type might not be + available. + * Convert ROWID to PgInt8 instead of PgInt4 (the original behaviour led to + overflow errors.) + * Always set the displaysize field of cursor.description to -1. + PostgreSQL 7.3 doesn't provide this information any more and it's pretty + useless nowadays that we've mostly left line printers beyond us. + + Changes to pyPgSQL/__init__.py + ------------------------------ + * Register libpq.PgInt8 with copy_reg only if available. + + Changes to pglargeobject.c + -------------------------- + * Made the 'closed' attribute of PgLargeObject an int instead of a + long. + + Changes to libpqmodule.c: + ------------------------- + * Fixed the format string of ParseTuple in libPQbool_FromInt. + This closes a bug that appeared on Linux/Alpha (#625121). + + Changes to PgSQLTestcases: + -------------------------- + * Don't check for the obsolete displaysize field in + cursor.description. Also don't check the backend encoding. + + Multiple files + -------------- + The windows/ directory has been moved to a port/ directory. Now we *always* + use our own version of various string versions instead of special casing for a + dozen different Windows and Unix platforms. + + In order to get the C version of PgInt8Type, it is now required that the + constants LLONG_MAX, LLONG_MIN, ULLONG_MAX and ULLONG_MIN are defined when + including limits.h and that including Python.h defines HAVE_LONG_LONG. + Otherwise, a Python class is used instead. + Changes since pyPgSQL Version 2.1 ================================= |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 04:14:55
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory usw-pr-cvs1:/tmp/cvs-serv9615/pyPgSQL Modified Files: PgSQL.py Log Message: 27OCT2002 gh (This change was actually part of the previous commit, but I forgot to document it appropriately:) Always set the displaysize field of cursor.description to -1. PostgreSQL 7.3 doesn't provide this information any more and it's pretty useless nowadays that we've mostly left line printers beyond us. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PgSQL.py 27 Oct 2002 04:01:41 -0000 1.18 --- PgSQL.py 27 Oct 2002 04:14:52 -0000 1.19 *************** *** 33,36 **** --- 33,41 ---- # - Convert ROWID to PgInt8 instead of PgInt4 (the origi- | # nal behaviour led to overflow errors.) | + # - Always set the displaysize field of | + # cursor.description to -1. PostgreSQL 7.3 doesn't | + # provide this information any more and it's pretty | + # useless nowadays that we've mostly left line printers | + # beyond us. | # 02OCT2002 gh - Only support mxDateTime 2.x and give useful error | # message if import fails. | |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 04:07:53
|
Update of /cvsroot/pypgsql/pypgsql/test In directory usw-pr-cvs1:/tmp/cvs-serv6183/test Modified Files: PgSQLTestCases.py Log Message: 27OCT2002 gh Don't check for the obsolete displaysize field in cursor.description. Also don't check the backend encoding. Index: PgSQLTestCases.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/test/PgSQLTestCases.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PgSQLTestCases.py 8 Sep 2002 15:24:24 -0000 1.22 --- PgSQLTestCases.py 27 Oct 2002 04:07:50 -0000 1.23 *************** *** 33,36 **** --- 33,39 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 27OCT2002 gh Don't check for the obsolete displaysize field in | + # cursor.description. Also don't check the backend enco- | + # ding. | # 08SEP2002 gh Added tests for PgResultSet. | # 11AUG2002 bga Added additional tests for the PgNumeric class. | *************** *** 625,629 **** self.failUnless(self.cur.description[0][0] == "datname" and self.cur.description[0][1] == PgSQL.PG_NAME and - self.cur.description[0][2] == 32 and self.cur.description[0][3] == 32 and self.cur.description[0][4] == None and --- 628,631 ---- *************** *** 645,649 **** self.failUnless(self.cur.description[0][0] == "datname" and self.cur.description[0][1] == PgSQL.PG_NAME and - self.cur.description[0][2] == 32 and self.cur.description[0][3] == 32 and self.cur.description[0][4] == None and --- 647,650 ---- *************** *** 665,669 **** self.failUnless(self.cur.description[0][0] == "datname" and self.cur.description[0][1] == PgSQL.PG_NAME and - self.cur.description[0][2] == 32 and self.cur.description[0][3] == 32 and self.cur.description[0][4] == None and --- 666,669 ---- *************** *** 675,679 **** self.failUnless(self.cur.description[1][0] == "datdba" and self.cur.description[1][1] == PgSQL.PG_INT4 and - self.cur.description[1][2] == 10 and self.cur.description[1][3] == 4 and self.cur.description[1][4] == None and --- 675,678 ---- *************** *** 685,689 **** self.failUnless(self.cur.description[2][0] == "encoding" and self.cur.description[2][1] == PgSQL.PG_INT4 and - self.cur.description[2][2] == 10 and self.cur.description[2][3] == 4 and self.cur.description[2][4] == None and --- 684,687 ---- *************** *** 696,700 **** self.failUnless(self.cur.description[clen - 1][0] == "datpath" and self.cur.description[clen - 1][1] == PgSQL.PG_TEXT and - self.cur.description[clen - 1][2] == -5 and self.cur.description[clen - 1][3] == -1 and self.cur.description[clen - 1][4] == None and --- 694,697 ---- *************** *** 731,735 **** self.failUnless(self.res[0].datname == 'template1' and - self.res[0]['encoding'] == 0 and self.res[0][0] == 'template1', 'The query did not return the correct result.') --- 728,731 ---- |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 04:05:45
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv4888 Modified Files: pyPgSQL.spec Log Message: 27OCT2002 gh Updated for the upcoming version 2.3. Index: pyPgSQL.spec =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL.spec,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pyPgSQL.spec 16 Sep 2002 05:33:46 -0000 1.2 --- pyPgSQL.spec 27 Oct 2002 04:05:42 -0000 1.3 *************** *** 1,5 **** %define name pyPgSQL ! %define version 2.2 ! %define release 2 Summary: pyPgSQL - A Python DB-API 2.0 compliant interface to PostgreSQL. --- 1,5 ---- %define name pyPgSQL ! %define version 2.3 ! %define release 1 Summary: pyPgSQL - A Python DB-API 2.0 compliant interface to PostgreSQL. *************** *** 56,59 **** --- 56,62 ---- %changelog + * Sat Oct 19 2002 Gerhard Häring <ger...@gm...> + - Updated to version 2.3. + * Sun Sep 08 2002 Sean Reifschneider <jaf...@tu...> - Updated to version 2.2. |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 04:01:43
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory usw-pr-cvs1:/tmp/cvs-serv2112/pyPgSQL Modified Files: PgSQL.py Log Message: 27OCT2002 gh - Merged the Unicode patch. Closes #484468. - Convert ROWID to PgInt8 instead of PgInt4 (the origi- nal behaviour led to overflow errors.) Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PgSQL.py 2 Oct 2002 05:16:44 -0000 1.17 --- PgSQL.py 27 Oct 2002 04:01:41 -0000 1.18 *************** *** 30,33 **** --- 30,36 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 27OCT2002 gh - Merged the Unicode patch. Closes #484468. | + # - Convert ROWID to PgInt8 instead of PgInt4 (the origi- | + # nal behaviour led to overflow errors.) | # 02OCT2002 gh - Only support mxDateTime 2.x and give useful error | # message if import fails. | *************** *** 189,193 **** 'database', 'user', 'password', 'options', and 'tty'. The port may also be passed in as part of the host keyword parameter, ! ie. host='localhost:5432'. connection.cursor() -> cursor --- 192,207 ---- 'database', 'user', 'password', 'options', and 'tty'. The port may also be passed in as part of the host keyword parameter, ! ie. host='localhost:5432'. Other optional parameters are ! client_encoding and unicode_results. If unicode_results is true, ! all strings from the backend are returned as Unicode strings. ! ! client_encoding accepts the same parameters as the encode method ! of Unicode strings. If you also want to set a policy for encoding ! errors, set client_encoding to a tuple, like ("koi8-r", "replace") ! ! Note that you still must make sure that the PostgreSQL client is ! using the same encoding as set with the client_encoding parameter. ! This is typically done by issuing a "SET CLIENT_ENCODING TO ..." ! SQL statement immediately after creating the connection. connection.cursor() -> cursor *************** *** 347,351 **** from types import * ! from sys import getrefcount import string import re --- 361,366 ---- from types import * ! from sys import getrefcount, getdefaultencoding ! import copy import string import re *************** *** 714,723 **** else: return PgInt2(value) ! elif _ftv == PG_INT4 or _ftv == ROWID: if type(value) is IntType: return value else: return int(value) ! elif _ftv == PG_INT8: if type(PgInt8) is ClassType: if isinstance(value, PgInt8): --- 729,738 ---- else: return PgInt2(value) ! elif _ftv == PG_INT4: if type(value) is IntType: return value else: return int(value) ! elif _ftv == PG_INT8 or _ftv == ROWID: if type(PgInt8) is ClassType: if isinstance(value, PgInt8): *************** *** 757,761 **** else: return PgOther(value) ! # Other typecasting is not needed. It will be once support for # the other built-in types (ie. box, line, inet, cidr, etc) are added. --- 772,778 ---- else: return PgOther(value) ! elif self.__conn.unicode_results \ ! and _ftv in (PG_CHAR, PG_BPCHAR, PG_TEXT, PG_VARCHAR, PG_NAME): ! return unicode(value, *self.__conn.client_encoding) # Other typecasting is not needed. It will be once support for # the other built-in types (ie. box, line, inet, cidr, etc) are added. *************** *** 808,812 **** except KeyError: _nl = len(self.__conn.notices) ! _res = self.__conn.conn.query("SELECT typname, typprtlen, typelem " "FROM pg_type " "WHERE oid = %s" % pgtype.value) --- 825,829 ---- except KeyError: _nl = len(self.__conn.notices) ! _res = self.__conn.conn.query("SELECT typname, -1 , typelem " "FROM pg_type " "WHERE oid = %s" % pgtype.value) *************** *** 1746,1753 **** def connect(dsn=None, user=None, password=None, host=None, database=None, ! port=None, options=None, tty=None): """ connection = PgSQL.connect(dsn[, user, password, host, database, port, ! options, tty]) Opens a connection to a PostgreSQL database.""" --- 1763,1772 ---- def connect(dsn=None, user=None, password=None, host=None, database=None, ! port=None, options=None, tty=None, client_encoding=None, ! unicode_results=None): """ connection = PgSQL.connect(dsn[, user, password, host, database, port, ! options, tty] [, client_encoding] ! [, unicode_results]) Opens a connection to a PostgreSQL database.""" *************** *** 1791,1795 **** connInfo = "%s%s=%s " % (connInfo, i, _d[i]) ! return Connection(connInfo) def _handleArray(value): --- 1810,1814 ---- connInfo = "%s%s=%s " % (connInfo, i, _d[i]) ! return Connection(connInfo, client_encoding, unicode_results) def _handleArray(value): *************** *** 1861,1865 **** for k, v in vdict.items(): t[k]=_quote(v) ! elif type(vdict) is StringType: # Note: a string is a SequenceType, but is treated as a single # entity, not a sequence of characters. --- 1880,1884 ---- for k, v in vdict.items(): t[k]=_quote(v) ! elif type(vdict) in (StringType, UnicodeType): # Note: a string is a SequenceType, but is treated as a single # entity, not a sequence of characters. *************** *** 1883,1887 **** """Python DB-API 2.0 Connection Object.""" ! def __init__(self, connInfo): try: self.__dict__["conn"] = PQconnectdb(connInfo) --- 1902,1906 ---- """Python DB-API 2.0 Connection Object.""" ! def __init__(self, connInfo, client_encoding=None, unicode_results=None): try: self.__dict__["conn"] = PQconnectdb(connInfo) *************** *** 1906,1909 **** --- 1925,1934 ---- self.__dict__["cursors"] = weakref.WeakValueDictionary() + self.unicode_results = unicode_results + if type(client_encoding) in (TupleType, ListType): + self.client_encoding = client_encoding + else: + self.client_encoding = (client_encoding or getdefaultencoding(),) + def __del__(self): if self._isOpen: *************** *** 1977,1980 **** --- 2002,2007 ---- raise ValueError, \ 'TransactionLevel must be: "", "READ COMMITTED", or "SERIALIZABLE"' + elif name in ('unicode_results', 'client_encoding'): + self.__dict__[name] = value elif self.__dict__.has_key(name): raise AttributeError, "%s is read-only." % name *************** *** 2277,2281 **** else: raise AttributeError, name ! def __fetchOneRow(self): if self._idx_ >= self._rows_: --- 2304,2338 ---- else: raise AttributeError, name ! ! def __unicodeConvert(self, obj): ! if type(obj) is StringType: ! return obj ! elif type(obj) is UnicodeType: ! return obj.encode(*self.conn.client_encoding) ! elif type(obj) in (ListType, TupleType): ! converted_obj = [] ! for item in obj: ! if type(item) is UnicodeType: ! converted_obj.append(item.encode(*self.conn.client_encoding)) ! else: ! converted_obj.append(item) ! return converted_obj ! elif type(obj) is DictType: ! converted_obj = {} ! for k, v in obj.items(): ! if type(v) is UnicodeType: ! converted_obj[k] = v.encode(*self.conn.client_encoding) ! else: ! converted_obj[k] = v ! return converted_obj ! elif isinstance(obj, PgResultSet): ! obj = copy.copy(obj) ! for k, v in obj.items(): ! if type(v) is UnicodeType: ! obj[k] = v.encode(*self.conn.client_encoding) ! return obj ! else: ! return obj ! def __fetchOneRow(self): if self._idx_ >= self._rows_: *************** *** 2435,2438 **** --- 2492,2498 ---- self.conn.__dict__["inTransaction"] = 1 + proc = self.__unicodeConvert(proc) + args = self.__unicodeConvert(args) + _qstr = "select %s(" % proc for _i in range(len(args)): *************** *** 2567,2570 **** --- 2627,2631 ---- try: + _qstr = self.__unicodeConvert(_qstr) if len(parms) == 0: # If there are no paramters, just execute the query. *************** *** 2574,2579 **** --- 2635,2642 ---- (type(parms[0]) in [DictType, ListType, TupleType] or \ isinstance(parms[0], PgResultSet)): + parms = (self.__unicodeConvert(parms[0]),) parms = _quoteall(parms[0]) else: + parms = self.__unicodeConvert(parms) parms = tuple(map(_quote, parms)); self.res = self.conn.conn.query(_qstr % parms) |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 03:52:37
|
Update of /cvsroot/pypgsql/pypgsql/test/regression In directory usw-pr-cvs1:/tmp/cvs-serv29648 Added Files: unicode_tests.py Log Message: 27OCT2002 gh Initial release of the Unicode test suite. --- NEW FILE: unicode_tests.py --- #!/usr/bin/env python #ident "@(#) $Id: unicode_tests.py,v 1.1 2002/10/27 03:52:34 ghaering Exp $" #-----------------------------------------------------------------------+ # Name: unicode_tests.py | # | # Synopsys: | # | # Description: Tests for the Unicode support in pyPgSQL. | #=======================================================================| # Copyright 2000 by Billy G. Allie. | # All rights reserved. | # | # Permission to use, copy, modify, and distribute this software and its | # documentation for any purpose and without fee is hereby granted, pro- | # vided that the above copyright notice appear in all copies and that | # both that copyright notice and this permission notice appear in sup- | # porting documentation, and that the copyright owner's name not be | # used in advertising or publicity pertaining to distribution of the | # software without specific, written prior permission. | # | # THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, | # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | # NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR | # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE | # USE OR PERFORMANCE OF THIS SOFTWARE. | #=======================================================================| # Revision History: | # | # Date Ini Description | # --------- --- ------------------------------------------------------- | # 27OCT2002 gh Initial release by Gerhard Häring | #-----------------------------------------------------------------------+ import types import unittest from pyPgSQL import PgSQL # Note: This test suite requires # - that a database 'pypgsql' exists with encoding set to UNICODE: # $ createdb pypgsql -E UNICODE # - that this database has support for PL/PgSQL: # $ createlang plpgsql pypgsql dbname = "pypgsql" class UnicodeDatabaseTestCase(unittest.TestCase): def testInsertWithUtf8(self): conn = PgSQL.connect(database=dbname, client_encoding=("utf-8",), unicode_results=1) cursor = conn.cursor() cursor.execute("set client_encoding to unicode") l1_text = unicode("Österreich", "latin1") cursor = conn.cursor() cursor.execute("create table test (name varchar(20))") cursor.execute(u"insert into test(name) values (%s)", l1_text) cursor.execute("select name from test") name = cursor.fetchone().name self.failUnless(name == l1_text, "latin1 text from insert and select don't match") def testInsertWithLatin1(self): conn = PgSQL.connect(database=dbname, client_encoding=("latin1",), unicode_results=1) cursor = conn.cursor() cursor.execute("set client_encoding to latin1") l1_text = unicode("Österreich", "latin1") cursor = conn.cursor() cursor.execute("create table test (name varchar(20))") cursor.execute(u"insert into test(name) values (%s)", (l1_text,)) cursor.execute("select name from test") name = cursor.fetchone().name self.failUnless(name == l1_text, "latin1 text from insert and select don't match") def testCallProcUtf8(self): text1 = unicode("Österreich-", "latin1") text2 = unicode("Ungarn", "ascii") conn = PgSQL.connect(database=dbname, client_encoding=("utf-8",), unicode_results=1) cursor = conn.cursor() cursor.execute("set client_encoding to unicode") cursor.execute(u""" CREATE FUNCTION concat_text (TEXT, TEXT) RETURNS TEXT AS ' BEGIN RETURN $1 || $2; END; 'LANGUAGE 'plpgsql'; """) cursor.callproc(u"concat_text", text1, text2) result = cursor.fetchone()[0] self.failUnless(result == text1 + text2, "procedure didn't return the two strings concatenated") def testCallProcLatin1(self): text1 = unicode("Österreich-", "latin1") text2 = unicode("Ungarn", "ascii") conn = PgSQL.connect(database=dbname, client_encoding=("latin1",)) cursor = conn.cursor() cursor.execute("set client_encoding to latin1") cursor.execute(u""" CREATE FUNCTION concat_text (TEXT, TEXT) RETURNS TEXT AS ' BEGIN RETURN $1 || $2; END; 'LANGUAGE 'plpgsql'; """) cursor.callproc(u"concat_text", text1, text2) result = cursor.fetchone()[0] self.failUnless(unicode(result, "latin1") == text1 + text2, "procedure didn't return the two strings concatenated") def testCallProcLatin1UnicodeResults(self): text1 = unicode("Österreich-", "latin1") text2 = unicode("Ungarn", "ascii") conn = PgSQL.connect(database=dbname, client_encoding=("latin1",), unicode_results=1) cursor = conn.cursor() cursor.execute("set client_encoding to latin1") cursor.execute(u""" CREATE FUNCTION concat_text (TEXT, TEXT) RETURNS TEXT AS ' BEGIN RETURN $1 || $2; END; 'LANGUAGE 'plpgsql'; """) cursor.callproc(u"concat_text", text1, text2) result = cursor.fetchone()[0] self.failUnless(result == text1 + text2, "procedure didn't return the two strings concatenated") def __testUnicodeConversion(self, item): text = unicode("Österreich", "latin1") conn = PgSQL.connect(database=dbname, client_encoding=("utf-8",), unicode_results=1) cursor = conn.cursor() cursor.execute("set client_encoding to unicode") cursor.execute("create table test (name varchar(20))") cursor.execute("insert into test (name) values (%s)", text) if type(item) is types.DictType: cursor.execute("select name from test where name=%(name)s", item) else: cursor.execute("select name from test where name=%s", item) result = cursor.fetchall() self.failUnless(len(result) == 1, "couldn't find the inserted string") def testTupleUnicodeConversion(self): self.__testUnicodeConversion((unicode("Österreich", "latin1"),)) def testListUnicodeConversion(self): self.__testUnicodeConversion([unicode("Österreich", "latin1")]) def testDictUnicodeConversion(self): self.__testUnicodeConversion({"name": unicode("Österreich", "latin1")}) def testPgResultSetUnicodeConversion(self): text = unicode("Österreich", "latin1") conn = PgSQL.connect(database=dbname, client_encoding=("utf-8",), unicode_results=1) cursor = conn.cursor() cursor.execute("set client_encoding to unicode") cursor.execute("create table test (name varchar(20))") cursor.execute("insert into test (name) values (%s)", text) cursor.execute("select name from test") result = cursor.fetchone() cursor.execute("select name from test where name=%s", result[0]) result2 = cursor.fetchall() self.failUnless(len(result2) == 1) cursor.execute("select name from test where name=%(name)s", result) result2 = cursor.fetchall() self.failUnless(len(result2) == 1, "couldn't find the inserted string") def suite(): unicode_tests = unittest.makeSuite(UnicodeDatabaseTestCase, "test") return unicode_tests def main(): runner = unittest.TextTestRunner() runner.run(suite()) if __name__ == "__main__": main() |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 03:47:30
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv26650 Modified Files: setup.py Log Message: 27OCT2002 gh Changed version number to 2.3 beta 1. Index: setup.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/setup.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** setup.py 7 Oct 2002 06:36:33 -0000 1.18 --- setup.py 27 Oct 2002 03:47:27 -0000 1.19 *************** *** 68,72 **** from distutils.extension import Extension ! __version__ = "2.3" # Define the runtime library path for this module. It starts out as None. --- 68,72 ---- from distutils.extension import Extension ! __version__ = "2.3b1" # Define the runtime library path for this module. It starts out as None. |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 03:47:30
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory usw-pr-cvs1:/tmp/cvs-serv26650/pyPgSQL Modified Files: __init__.py Log Message: 27OCT2002 gh Changed version number to 2.3 beta 1. Index: __init__.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 4 Nov 2001 05:56:21 -0000 1.2 --- __init__.py 27 Oct 2002 03:47:27 -0000 1.3 *************** *** 32,34 **** """ ! __version__ = "2.0" --- 32,34 ---- """ ! __version__ = "2.3b1" |
From: Gerhard H?r. <gha...@us...> - 2002-10-27 03:43:10
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv23256 Modified Files: README Log Message: 27OCT2002 gh - Updates for 2.3b1. - Converted the whole document into reStructuredText, so we can easily built a HTML version using docutils (http://docutils.sf.net/). Index: README =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/README,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** README 8 Sep 2002 16:17:19 -0000 1.25 --- README 27 Oct 2002 03:43:07 -0000 1.26 *************** *** 1,10 **** ! #ident "@(#) $Id$" ! pyPgSQL - v2.2: Python DB-API 2.0 Compliant Interface Module for PostgreSQL. ! =========================================================================== 0. Copyright notice and License =============================== ! pyPgSQL, version 2.2 A Python DB-API 2.0 compliant interface for PostgreSQL Copyright 2000 by Billy G. Allie. [...2724 lines suppressed...] When working with PostgreSQL large object, you MUST be in a transaction. --- 1576,1585 ---- a new transaction is created on the next call to execute(). If a PostgreSQL array (represented by a Python list) is the only parameter to ! a query, then it must be passed in a singleton tuple. For example:: ! cnx.query('insert into table values(%s)', (list,)) When working with PostgreSQL large object, you MUST be in a transaction. *************** *** 1392,1395 **** large object (i.e. lo_open will start a transaction if necessary. lo_close will end the transaction if it determines that lo_open started one.) - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= --- 1587,1588 ---- |
From: Gerhard H?r. <gha...@us...> - 2002-10-19 14:34:59
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv12682 Modified Files: pglargeobject.c Log Message: 19OCT2002 gh Made the 'closed' attribute of PgLargeObject an int instead of a long. Index: pglargeobject.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pglargeobject.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pglargeobject.c 2 Oct 2002 04:03:26 -0000 1.12 --- pglargeobject.c 19 Oct 2002 14:34:55 -0000 1.13 *************** *** 30,33 **** --- 30,35 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 19OCT2002 gh Made the 'closed' attribute of PgLargeObject an int | + | instead of a long. | | 03NOV2001 bga Closed a couple of possible memory leaks. These leaks | | had a low probability of occuring. | *************** *** 1286,1290 **** if (strcmp(attr, "closed") == 0) ! return Py_BuildValue("l", (long)(self->lo_fd == -1)); if (!strcmp(attr, "__module__")) --- 1288,1292 ---- if (strcmp(attr, "closed") == 0) ! return Py_BuildValue("i", (self->lo_fd == -1)); if (!strcmp(attr, "__module__")) |
From: Gerhard H?r. <gha...@us...> - 2002-10-19 14:30:03
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv10928 Modified Files: libpqmodule.c Log Message: 19OCT2002 gh Fixed the format string of ParseTuple in libPQbool_FromInt. This closes a bug that appeared on Linux/Alpha (#625121). Index: libpqmodule.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** libpqmodule.c 2 Oct 2002 04:08:37 -0000 1.24 --- libpqmodule.c 19 Oct 2002 14:30:00 -0000 1.25 *************** *** 32,35 **** --- 32,38 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 19OCT2002 gh Fixed the format string of ParseTuple in | + | libPQbool_FromInt. This closes a bug that appeared on | + | Linux/Alpha (#625121). | | 01OCT2002 gh HAVE_LONG_LONG => HAVE_LONG_LONG_SUPPORT | | 21APR2002 gh Removed special escaping of control characters in | *************** *** 917,921 **** long l; ! if (!PyArg_ParseTuple(args, "i:BooleanFromInteger", &l)) return NULL; --- 920,924 ---- long l; ! if (!PyArg_ParseTuple(args, "l:BooleanFromInteger", &l)) return NULL; |
From: Billy G. A. <bal...@us...> - 2002-10-07 06:36:39
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv31238 Modified Files: setup.py Log Message: CT2002 bga Added support for UnixWare 7 and OpenUNIX 8. Index: setup.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/setup.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** setup.py 16 Sep 2002 05:39:50 -0000 1.17 --- setup.py 7 Oct 2002 06:36:33 -0000 1.18 *************** *** 44,47 **** --- 44,48 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 06OCT2002 bga Added support for UnixWare7 and OpenUNIX 8. | # 16SEP2002 gh Total rework to make setup.py work out of the box for | # most popular platforms, while still allowing flexibi- | *************** *** 131,134 **** --- 132,140 ---- # XXX: This is an ugly hack to make bdist_rpm find the include files. cfg.include_dirs.append("../" * 5) + elif sys.platform[:8] == "unixware": + LOCALBASE = os.environ.get('LOCALBASE', '/usr/local/pgsql') + cfg.include_dirs = ['%s/include' % LOCALBASE] + cfg.library_dirs = ['%s/lib' % LOCALBASE] + cfg.pypgsql_rt_dirs = cfg.library_dirs elif sys.platform == "freebsd4": LOCALBASE = os.environ.get('LOCALBASE', '/usr/local') |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 11:49:14
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv8423 Modified Files: TODO Log Message: *p Implement an arbitrary precision type for Python by wrapping MAPM (http://www.tc.umn.edu/~ringx004/mapm-main.html). Then customize the type to behave like a PostgreSQL NUMERIC (gh) * Develop test cases for reading and writing all data types from/to PostgreSQL. * Make pyPgSQL compatible with PostgreSQL 7.3 (Beta). Make the testcases compatible with PostgreSQL 7.2 and 7.3. This requires special-casing the access to the system catalogs for the various backend versions. Index: TODO =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/TODO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TODO 25 Sep 2002 14:17:26 -0000 1.3 --- TODO 2 Oct 2002 11:49:10 -0000 1.4 *************** *** 27,34 **** PostgreSQL data type? ! * Reimplement PgNumeric using a BSD-licensed fixed point library * Don't use floats in PgMoney. Make PgMoney a subclass of PgNumeric instead. PERFORMANCE =========== --- 27,38 ---- PostgreSQL data type? ! * Implement an arbitrary precision type for Python by wrapping MAPM ! (http://www.tc.umn.edu/~ringx004/mapm-main.html). Then customize the type to ! behave like a PostgreSQL NUMERIC (gh) * Don't use floats in PgMoney. Make PgMoney a subclass of PgNumeric instead. + * Develop test cases for reading and writing all data types from/to PostgreSQL. + PERFORMANCE =========== *************** *** 75,78 **** --- 79,86 ---- * Make PgResultSet(ConcreteClass) pickleable. This will probably involve using the copy_reg module. + + * Make pyPgSQL compatible with PostgreSQL 7.3 (Beta). Make the testcases + compatible with PostgreSQL 7.2 and 7.3. This requires special-casing the + access to the system catalogs for the various backend versions. |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 11:32:10
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv4657 Modified Files: pgint8object.c pgint8object.h Log Message: 02OCT2002 gh LONG_LONG_MAX => LLONG_MAX Index: pgint8object.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgint8object.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pgint8object.c 2 Oct 2002 04:08:38 -0000 1.13 --- pgint8object.c 2 Oct 2002 11:32:07 -0000 1.14 *************** *** 40,43 **** --- 40,44 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 02OCT2002 gh LONG_LONG_MAX => LLONG_MAX | | 01OCT2002 gh HAVE_LONG_LONG => HAVE_LONG_LONG_SUPPORT | | 16SEP2002 gh Reflect the change from windows/ to port/. | *************** *** 89,93 **** LONG_LONG PgInt8_GetMax(void) { ! return LONG_LONG_MAX; } --- 90,94 ---- LONG_LONG PgInt8_GetMax(void) { ! return LLONG_MAX; } Index: pgint8object.h =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgint8object.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pgint8object.h 2 Oct 2002 04:08:38 -0000 1.6 --- pgint8object.h 2 Oct 2002 11:32:07 -0000 1.7 *************** *** 32,39 **** #endif - #if ! defined(LONG_LONG_MAX) - #define LONG_LONG_MAX 0x7fffffffffffffffLL - #endif - typedef struct { PyObject_HEAD --- 32,35 ---- |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 05:16:47
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory usw-pr-cvs1:/tmp/cvs-serv390/pyPgSQL Modified Files: PgSQL.py Log Message: 02OCT2002 gh Add support for the INTERVAL type. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** PgSQL.py 2 Oct 2002 04:52:56 -0000 1.16 --- PgSQL.py 2 Oct 2002 05:16:44 -0000 1.17 *************** *** 37,40 **** --- 37,41 ---- # - Take into account that libpq.PgInt8Type might not be | # available. | + # - Add support for the INTERVAL type. | # 08SEP2002 gh Fixed various problems with the PgResultSet: | # - Column (attribute and dictionary) access is now case- | *************** *** 526,529 **** --- 527,543 ---- self.__conn = None + def interval2datetimedelta(self, s): + """Parses both 7.0.x and 7.1.x styles of PostgreSQL INTERVALs""" + if s.startswith("-"): + factor = -1 + else: + factor = 1 + s = s.replace('days ', '').replace("-", "") + l = s.split() + if len(l) != 2: + l = ['0'] + l + return factor * (DateTime.DateTimeDelta(int(l[0])) \ + + DateTime.DateTimeDeltaFrom(l[1])) + def parseArray(self, s): """Parse a PostgreSQL array strings representation. *************** *** 727,731 **** return value else: ! return DateTime.ISO.ParseAny(value) elif _ftv == BINARY: if isinstance(value, PgBytea) or type(value) is PgLargeObjectType: --- 741,748 ---- return value else: ! if _ftv == PG_INTERVAL: ! return self.interval2datetimedelta(value) ! else: ! return DateTime.ISO.ParseAny(value) elif _ftv == BINARY: if isinstance(value, PgBytea) or type(value) is PgLargeObjectType: |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 04:52:59
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory usw-pr-cvs1:/tmp/cvs-serv26716/pyPgSQL Modified Files: PgSQL.py Log Message: 02OCT2002 gh - Only support mxDateTime 2.x and give useful error message if import fails. - Cosmetic changes: use cmp builtin where appropriate. - Fixed typo where PgTypes.__str__ was spelled incorrectly. Compare to None using "is" operator. - Take into account that libpq.PgInt8Type might not be available. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PgSQL.py 8 Sep 2002 15:16:45 -0000 1.15 --- PgSQL.py 2 Oct 2002 04:52:56 -0000 1.16 *************** *** 30,33 **** --- 30,40 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 02OCT2002 gh - Only support mxDateTime 2.x and give useful error | + # message if import fails. | + # - Cosmetic changes: use cmp builtin where appropriate. | + # - Fixed typo where PgTypes.__str__ was spelled | + # incorrectly. Compare to None using "is" operator. | + # - Take into account that libpq.PgInt8Type might not be | + # available. | # 08SEP2002 gh Fixed various problems with the PgResultSet: | # - Column (attribute and dictionary) access is now case- | *************** *** 353,357 **** from mx import DateTime except ImportError: ! import DateTime from libpq import * --- 360,366 ---- from mx import DateTime except ImportError: ! raise ImportError, \ ! """You need to install mxDateTime ! (http://www.egenix.com/files/python/eGenix-mx-Extensions.html)""" from libpq import * *************** *** 470,484 **** def __cmp__(self, other): ! if self.value < other: ! return -1 ! elif self.value == other: ! return 0 ! else: ! return 1 def __repr__(self): return PQftypeName(self.value) ! def __prt__(self): return PQftypeName(self.value) --- 479,488 ---- def __cmp__(self, other): ! return cmp(self.value, other) def __repr__(self): return PQftypeName(self.value) ! def __str__(self): return PQftypeName(self.value) *************** *** 1246,1250 **** def __cmp__(self, other): ! if other == None: return 1 _c = self.__coerce__(other) --- 1250,1254 ---- def __cmp__(self, other): ! if other is None: return 1 _c = self.__coerce__(other) *************** *** 1342,1351 **** def __cmp__(self, other): ! if self.value < other: ! return -1 ! elif self.value == other: ! return 0 ! else: ! return 1 def __add__(self, other): --- 1346,1350 ---- def __cmp__(self, other): ! return cmp(self.value, other) def __add__(self, other): *************** *** 1476,1485 **** def __cmp__(self, other): ! if self.value < other: ! return -1 ! elif self.value == other: ! return 0 ! else: ! return 1 def __nonzero__(self): --- 1475,1479 ---- def __cmp__(self, other): ! return cmp(self.value, other) def __nonzero__(self): *************** *** 1592,1596 **** def _quote(self, forArray=0): ! if self.value: s = str(self.value) if s[-1:] == "L": --- 1586,1590 ---- def _quote(self, forArray=0): ! if self.value is not None: s = str(self.value) if s[-1:] == "L": *************** *** 1599,1602 **** --- 1593,1598 ---- return 'NULL' + PgInt8Type = PgInt8 + #-----------------------------------------------------------------------+ *************** *** 1801,1805 **** elif type(_i) in [DateTime.DateTimeType, DateTime.DateTimeDeltaType]: _j = '%s"%s",' % (_j, _i) ! elif type(_i) is PgInt2Type or type(_i) is PgInt8Type: _j = '%s%s,' % (_j, str(_i)) else: --- 1797,1801 ---- elif type(_i) in [DateTime.DateTimeType, DateTime.DateTimeDeltaType]: _j = '%s"%s",' % (_j, _i) ! elif type(_i) is PgInt2Type or isinstance(_i, PgInt8Type): _j = '%s%s,' % (_j, str(_i)) else: |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 04:11:56
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL/libpq In directory usw-pr-cvs1:/tmp/cvs-serv17409/pyPgSQL/libpq Modified Files: __init__.py Log Message: 01OCT2002 gh Register libpq.PgInt8 with copy_reg only if available. Index: __init__.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/libpq/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** __init__.py 13 Oct 2001 20:58:22 -0000 1.1 --- __init__.py 2 Oct 2002 04:11:54 -0000 1.2 *************** *** 24,27 **** --- 24,29 ---- from libpq import __version__ + HAVE_LONG_LONG_SUPPORT = dir().count('PgInt8') == 1 + #-----------------------------------------------------------------------+ # Add support to pickle the following pyPgSQL opbjects: | *************** *** 70,76 **** copy_reg.pickle(PgInt2Type, pickle_PgInt2, _I2) ! def pickle_PgInt8(value): ! return _I8, (str(value),) ! copy_reg.pickle(PgInt8Type, pickle_PgInt8, _I8) def pickle_PgLargeObject(value): --- 72,79 ---- copy_reg.pickle(PgInt2Type, pickle_PgInt2, _I2) ! if HAVE_LONG_LONG_SUPPORT: ! def pickle_PgInt8(value): ! return _I8, (str(value),) ! copy_reg.pickle(PgInt8Type, pickle_PgInt8, _I8) def pickle_PgLargeObject(value): |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 04:08:41
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv16789 Modified Files: libpqmodule.c pgint2object.c pgint8object.c pgresult.c pgversion.c pgint8object.h Log Message: 01OCT2002 gh HAVE_LONG_LONG => HAVE_LONG_LONG_SUPPORT (see port/port.h) Index: libpqmodule.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** libpqmodule.c 21 Apr 2002 20:36:06 -0000 1.23 --- libpqmodule.c 2 Oct 2002 04:08:37 -0000 1.24 *************** *** 32,35 **** --- 32,36 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 01OCT2002 gh HAVE_LONG_LONG => HAVE_LONG_LONG_SUPPORT | | 21APR2002 gh Removed special escaping of control characters in | | arrays. | *************** *** 776,780 **** /*--------------------------------------------------------------------------*/ ! #if defined(HAVE_LONG_LONG) static PyObject *libPQint8_FromObject(PyObject *self, PyObject *args) { --- 777,781 ---- /*--------------------------------------------------------------------------*/ ! #if defined(HAVE_LONG_LONG_SUPPORT) static PyObject *libPQint8_FromObject(PyObject *self, PyObject *args) { *************** *** 848,852 **** return PgInt2_FromLong(PyInt_AS_LONG(obj)); } ! #if defined(HAVE_LONG_LONG) else if (PgInt8_Check(obj)) { --- 849,853 ---- return PgInt2_FromLong(PyInt_AS_LONG(obj)); } ! #if defined(HAVE_LONG_LONG_SUPPORT) else if (PgInt8_Check(obj)) { *************** *** 999,1003 **** { "PgBooleanFromInteger", (PyCFunction)libPQbool_FromInt, 1 }, { "PgBoolean", (PyCFunction)libPQbool_FromObject, 1 }, ! #if defined(HAVE_LONG_LONG) { "PgInt8", (PyCFunction)libPQint8_FromObject, 1 }, #endif --- 1000,1004 ---- { "PgBooleanFromInteger", (PyCFunction)libPQbool_FromInt, 1 }, { "PgBoolean", (PyCFunction)libPQbool_FromObject, 1 }, ! #if defined(HAVE_LONG_LONG_SUPPORT) { "PgInt8", (PyCFunction)libPQint8_FromObject, 1 }, #endif *************** *** 1026,1030 **** initpgboolean(); initpgint2(); ! #if defined(HAVE_LONG_LONG) initpgint8(); #endif --- 1027,1031 ---- initpgboolean(); initpgint2(); ! #if defined(HAVE_LONG_LONG_SUPPORT) initpgint8(); #endif *************** *** 1195,1199 **** (PyObject *)&PgLargeObject_Type); PyDict_SetItemString(d, "PgBooleanType", (PyObject *)&PgBoolean_Type); ! #if defined(HAVE_LONG_LONG) PyDict_SetItemString(d, "PgInt8Type", (PyObject *)&PgInt8_Type); #endif --- 1196,1200 ---- (PyObject *)&PgLargeObject_Type); PyDict_SetItemString(d, "PgBooleanType", (PyObject *)&PgBoolean_Type); ! #if defined(HAVE_LONG_LONG_SUPPORT) PyDict_SetItemString(d, "PgInt8Type", (PyObject *)&PgInt8_Type); #endif Index: pgint2object.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgint2object.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pgint2object.c 4 Nov 2001 05:36:03 -0000 1.11 --- pgint2object.c 2 Oct 2002 04:08:38 -0000 1.12 *************** *** 33,36 **** --- 33,37 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 01OCT2002 gh HAVE_LONG_LONG => HAVE_LONG_LONG_SUPPORT | | 01OCT2001 bga Changed all new style comments to original style. | | 26SEP2001 bga Change the constructors so that they return PyObject * | *************** *** 316,320 **** Py_INCREF(*pw); } ! #if defined(HAVE_LONG_LONG) else if (PgInt8_Check(*pw)) { --- 317,321 ---- Py_INCREF(*pw); } ! #if defined(HAVE_LONG_LONG_SUPPORT) else if (PgInt8_Check(*pw)) { *************** *** 350,354 **** Py_INCREF(*pv); } ! #if defined(HAVE_LONG_LONG) else if (PgInt8_Check(*pv)) { --- 351,355 ---- Py_INCREF(*pv); } ! #if defined(HAVE_LONG_LONG_SUPPORT) else if (PgInt8_Check(*pv)) { Index: pgint8object.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgint8object.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pgint8object.c 16 Sep 2002 05:42:06 -0000 1.12 --- pgint8object.c 2 Oct 2002 04:08:38 -0000 1.13 *************** *** 40,43 **** --- 40,44 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 01OCT2002 gh HAVE_LONG_LONG => HAVE_LONG_LONG_SUPPORT | | 16SEP2002 gh Reflect the change from windows/ to port/. | | 01OCT2001 bga Changed all new style comments to original style. | *************** *** 73,77 **** #include "libpqmodule.h" ! #if defined(HAVE_LONG_LONG) static PyObject *err_ovf(char *msg) --- 74,78 ---- #include "libpqmodule.h" ! #if defined(HAVE_LONG_LONG_SUPPORT) static PyObject *err_ovf(char *msg) Index: pgresult.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgresult.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pgresult.c 4 Feb 2002 02:12:04 -0000 1.17 --- pgresult.c 2 Oct 2002 04:08:38 -0000 1.18 *************** *** 29,32 **** --- 29,33 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 01OCT2002 gh HAVE_LONG_LONG => HAVE_LONG_LONG_SUPPORT | | 03FEB2002 bga Change the constant that is used to determine when to | | check an OID to see if it is a Large Object form 1700 | *************** *** 596,600 **** case PG_INT8: ! #if defined(HAVE_LONG_LONG) valueObj = (PyObject *)PgInt8_FromString(value, (char **)NULL, 10); --- 597,601 ---- case PG_INT8: ! #if defined(HAVE_LONG_LONG_SUPPORT) valueObj = (PyObject *)PgInt8_FromString(value, (char **)NULL, 10); Index: pgversion.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgversion.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pgversion.c 16 Sep 2002 05:45:29 -0000 1.17 --- pgversion.c 2 Oct 2002 04:08:38 -0000 1.18 *************** *** 348,355 **** --- 348,357 ---- value = PyInt_AsLong(*r); } + #if defined(HAVE_LONG_LONG_SUPPORT) if (PgInt8_Check(*r)) { value = PgInt8_AsLong((PgInt8Object *)(*r)); } + #endif else if (PyLong_Check(*r)) { Index: pgint8object.h =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgint8object.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pgint8object.h 26 Sep 2001 05:45:30 -0000 1.5 --- pgint8object.h 2 Oct 2002 04:08:38 -0000 1.6 *************** *** 5,9 **** extern "C" { #endif ! #if defined(HAVE_LONG_LONG) /***********************************************************************\ --- 5,9 ---- extern "C" { #endif ! #if defined(HAVE_LONG_LONG_SUPPORT) /***********************************************************************\ |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 04:06:35
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv16438 Modified Files: libpqmodule.h Log Message: 01OCT2002 gh Reflect change from windows/ to ports/ and thus remove special-casing for win32 and Cygwin. Index: libpqmodule.h =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** libpqmodule.h 4 Feb 2002 02:09:52 -0000 1.8 --- libpqmodule.h 2 Oct 2002 04:06:32 -0000 1.9 *************** *** 29,32 **** --- 29,33 ---- #include <libpq-fe.h> #include <libpq/libpq-fs.h> + #include "port/port.h" #include "pg_types.h" #include "pgboolean.h" *************** *** 107,120 **** void *PyMem_Strdup(void *); - - /***********************************************************************\ - | Declare these here in case we're compiling on a MS Windows system. | - \***********************************************************************/ - - #if defined(MS_WIN32) || defined(__CYGWIN__) - char *strtok_r(char *, const char *, char **); - LONG_LONG strtoll(const char *, char **, int); - unsigned LONG_LONG strtoull(const char *, char **, int); - #endif #ifdef __cplusplus --- 108,111 ---- |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 04:03:29
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv15794 Modified Files: pglargeobject.c Log Message: 01OCT2002 gh Removed unused variable. Index: pglargeobject.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pglargeobject.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pglargeobject.c 4 Nov 2001 05:36:03 -0000 1.11 --- pglargeobject.c 2 Oct 2002 04:03:26 -0000 1.12 *************** *** 1199,1204 **** PgLargeObject *lo; PyObject *res; ! PGconn *cnx; ! int fd, offset = 0; --- 1199,1203 ---- PgLargeObject *lo; PyObject *res; ! int offset = 0; |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 03:59:08
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv14628 Modified Files: README.win32 Log Message: 01OCT2002 gh - Remove out of date warning about PostgreSQL on win32 - Reflect change from windows/ to ports/ => remove Windows-specific remarks about windows/ directory. Index: README.win32 =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/README.win32,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README.win32 5 Oct 2001 23:09:03 -0000 1.2 --- README.win32 2 Oct 2002 03:59:05 -0000 1.3 *************** *** 3,24 **** ========================================================================== ! by Gerhard Haering (ge...@bi...) ! ! 1. Warning ! ========== ! ! pyPgSQL uses the libpq client library of PostgreSQL. On Windows, however, this ! library isn't as stable as it is on Unix. The good news is that the stability ! is improving. Version 7.2 of PostgreSQL will have better win32 support than ! previous versions. ! ! For this reason, the binary win32 versions of pyPgSQL that we provide are ! already built against the PostgreSQL 7.2 development version. ! ! 2. Compiling PostgreSQL's libpq client library ============================================== ! 2.1 With Visual C++ ------------------- --- 3,12 ---- ========================================================================== ! by Gerhard Häring (ger...@gm...) ! 1. Compiling PostgreSQL's libpq client library ============================================== ! 1.1 With Visual C++ ------------------- *************** *** 27,31 **** source tree and issue "nmake -f win32.mak". ! 2.2 With gcc ------------ --- 15,19 ---- source tree and issue "nmake -f win32.mak". ! 1.2 With gcc ------------ *************** *** 39,49 **** ! 3. Building pyPgSQL =================== ! 3.1 Adjust setup.py ------------------- ! 3.1.1 For Visual C++ - Adjust win_pg_build_root to point to your PostgreSQL source tree --- 27,37 ---- ! 2. Building pyPgSQL =================== ! 2.1 Adjust setup.py ------------------- ! 2.1.1 For Visual C++ - Adjust win_pg_build_root to point to your PostgreSQL source tree *************** *** 57,61 **** directory ! 3.1.2 For gcc (mingw32) - Adjust win_pg_build_root to point to your PostgreSQL source tree --- 45,49 ---- directory ! 2.1.2 For gcc (mingw32) - Adjust win_pg_build_root to point to your PostgreSQL source tree *************** *** 72,76 **** data_files = [] ! 3.2 Building ------------ --- 60,64 ---- data_files = [] ! 2.2 Building ------------ *************** *** 91,103 **** the native win32 Python you want to use; I prefer to have a copy of the win32 Python under an alternative name like ntpython in my PATH - - 3.3 Additional source files in the windows directory - ---------------------------------------------------- - - Neither Visual C++ nor the current versions of mingw32 or Cygwin include the - functions strtoll, strtoull and strtok_r. You'll need these to compile - successfully. strtok.c and modified (to compile under the Cygwin) versions of - strtoll.c and strtoull.c from the FreeBSD CVS have been added to the pyPgSQL - source tree. You can download the original files from the following URL: - http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/ - --- 79,80 ---- |
From: Gerhard H?r. <gha...@us...> - 2002-10-02 03:55:27
|
Update of /cvsroot/pypgsql/pypgsql/port In directory usw-pr-cvs1:/tmp/cvs-serv14188 Modified Files: port.h strtoll.c strtoull.c Log Message: 01OCT2002 gh Don't guess about the limits of (unsigned) long longs. If HAVE_LONG_LONG and all required constants are defined by including limits.h, then define HAVE_LONG_LONG_SUPPORT. Index: port.h =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/port/port.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** port.h 16 Sep 2002 05:28:14 -0000 1.1 --- port.h 2 Oct 2002 03:55:24 -0000 1.2 *************** *** 6,9 **** --- 6,10 ---- **********************************************************************/ #include <limits.h> + #include "Python.h" #ifdef MS_WIN32 *************** *** 19,32 **** #endif /* MS_WIN32 */ ! /* Some braindead combinations of compilers don't get the constants defined, ! * for example gcc 2.95.x and Linux glibc. We do their work for them: */ ! #if !defined(LLONG_MAX) ! #define LL_LITERAL(x) x##LL ! #define ULL_LITERAL(x) x##ULL ! ! #define ULLONG_MAX (~ULL_LITERAL(0)) ! #define LLONG_MAX (ULLONG_MAX/2) ! #define LLONG_MIN (-(ULLONG_MAX/2)+1) ! #endif /* !defined(LLONG_MAX) */ /******************************************************* --- 20,32 ---- #endif /* MS_WIN32 */ ! /* There are compiler/platform combinations that HAVE_LONG_LONG, but don't ! * provide the respective constants by default. Examples are Linux glibc and ! * Cygwin. Only define HAVE_LONG_LONG_SUPPORT if both conditions are ! * fulfilled. ! */ ! #if defined(HAVE_LONG_LONG) && defined(LLONG_MAX) && defined(ULLONG_MAX) \ ! && defined(LLONG_MIN) ! #define HAVE_LONG_LONG_SUPPORT ! #endif /******************************************************* *************** *** 37,41 **** --- 37,44 ---- char * pg_strtok(char *s, const char *delim); + #if defined(HAVE_LONG_LONG_SUPPORT) LONG_LONG pg_strtoll(const char *nptr, char **endptr, register int base); unsigned LONG_LONG pg_strtoull(const char *nptr, char **endptr, register int base); + #endif + #endif /* !defined(PYPGSQL_COMPAT_H) */ Index: strtoll.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/port/strtoll.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** strtoll.c 16 Sep 2002 05:28:14 -0000 1.1 --- strtoll.c 2 Oct 2002 03:55:24 -0000 1.2 *************** *** 51,54 **** --- 51,55 ---- #include "port.h" + #if defined(HAVE_LONG_LONG_SUPPORT) /* * Convert a string to a LONG_LONG integer. *************** *** 142,143 **** --- 143,145 ---- return (acc); } + #endif Index: strtoull.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/port/strtoull.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** strtoull.c 16 Sep 2002 05:28:14 -0000 1.1 --- strtoull.c 2 Oct 2002 03:55:24 -0000 1.2 *************** *** 51,54 **** --- 51,55 ---- #include "port.h" + #if defined(HAVE_LONG_LONG_SUPPORT) /* * Convert a string to an unsigned LONG_LONG integer. *************** *** 120,121 **** --- 121,123 ---- return (acc); } + #endif |
From: Gerhard H?r. <gha...@us...> - 2002-09-25 14:17:28
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv15796 Modified Files: TODO Log Message: 25SEP2002 gh Add item about pickling PgResultSets. Index: TODO =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TODO 19 Sep 2002 08:34:11 -0000 1.2 --- TODO 25 Sep 2002 14:17:26 -0000 1.3 *************** *** 73,76 **** --- 73,78 ---- (fetchReturnsList, noPostgresCursor) + * Make PgResultSet(ConcreteClass) pickleable. This will probably involve using + the copy_reg module. |
From: Gerhard H?r. <gha...@us...> - 2002-09-19 08:34:14
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv30788 Modified Files: TODO Log Message: 19SEP2002 gh Added planned changes to PgNumeric and PgMoney. Index: TODO =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TODO 9 Sep 2002 00:03:44 -0000 1.1 --- TODO 19 Sep 2002 08:34:11 -0000 1.2 *************** *** 27,30 **** --- 27,34 ---- PostgreSQL data type? + * Reimplement PgNumeric using a BSD-licensed fixed point library + + * Don't use floats in PgMoney. Make PgMoney a subclass of PgNumeric instead. + PERFORMANCE =========== |