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: Billy G. A. <bal...@us...> - 2005-03-01 21:07:10
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25157 Modified Files: libpqmodule.c pgversion.c Log Message: 01MAR2005 bga Implemented most outstanding bug fixes and patches. Index: libpqmodule.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** libpqmodule.c 10 Nov 2003 05:11:00 -0000 1.30 --- libpqmodule.c 1 Mar 2005 21:06:43 -0000 1.31 *************** *** 382,386 **** PyObject *result; ! slen = strlen(sin); sout = (char *)PyMem_Malloc(slen); if (sout == (char *)NULL) --- 382,386 ---- PyObject *result; ! slen = strlen(sin) + 1; sout = (char *)PyMem_Malloc(slen); if (sout == (char *)NULL) *************** *** 791,795 **** } ! PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed"); return (PyObject *)NULL; } --- 791,795 ---- } ! PyErr_SetString(PyExc_TypeError, "a string or numeric is required"); return (PyObject *)NULL; } *************** *** 855,859 **** } ! PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed"); return (PyObject *)NULL; } --- 855,859 ---- } ! PyErr_SetString(PyExc_TypeError, "a string or numeric is required"); return (PyObject *)NULL; } *************** *** 907,911 **** } ! PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed"); return (PyObject *)NULL; } --- 907,911 ---- } ! PyErr_SetString(PyExc_TypeError, "a string or numeric is required"); return (PyObject *)NULL; } Index: pgversion.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgversion.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** pgversion.c 6 Oct 2003 19:40:23 -0000 1.21 --- pgversion.c 1 Mar 2005 21:06:44 -0000 1.22 *************** *** 176,199 **** return 1; errno = 0; *result = strtol(token, &last, 0); - /* Allow for development versions */ - if (pgstricmp(last, "devel") == 0) - return (errno != 0); - - /* Allow for alpha and beta versions */ - if (((*last == 'a') || (*last == 'b')) && isdigit(*(last+1))) - return (errno != 0); - - if ((pgstricmp(last, "alpha") == 0) || - (pgstricmp(last, "beta") == 0)) - return (errno != 0); - - /* Allow for release canidates */ - if ((*last == 'r') && (*(last+1) == 'c') && isdigit(*(last+2))) - return (errno != 0); - return ((errno != 0) || (*last != (char)0)); } --- 176,195 ---- return 1; + /** + * Only process the numeric part of the token, ignoring the + * non-numeric trailing part. This should handle development, + * alpha, beta, etc versions of PostgreSQL + */ + int i; + for (i = 1; token[i] != 0; i++) { + if (!isdigit(token[i])) { + token[i] = 0; + break; + } + } errno = 0; *result = strtol(token, &last, 0); return ((errno != 0) || (*last != (char)0)); } *************** *** 291,299 **** goto new_error; ! token = pg_strtok_r((char *)NULL, ".", &save_ptr); if ((token != (char *)NULL) && (*token != '\0') && ! (parseToken(token, &patch))) goto new_error; ! value = (((major * 100) + minor) * 100) + patch; --- 287,297 ---- goto new_error; ! token = pg_strtok_r((char *)NULL, ".-", &save_ptr); if ((token != (char *)NULL) && (*token != '\0') && ! (parseToken(token, &patch))) ! { goto new_error; ! } ! value = (((major * 100) + minor) * 100) + patch; |
From: <gha...@us...> - 2005-02-27 18:40:25
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14323/pyPgSQL Modified Files: PgSQL.py Log Message: 27FEB2005 gh Converted all checks for Unicode types to isinstance checks. Fixes bugs #1055180, #1051520, #1016026, #1016010. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** PgSQL.py 31 Jul 2004 20:20:13 -0000 1.43 --- PgSQL.py 27 Feb 2005 18:40:04 -0000 1.44 *************** *** 2323,2327 **** 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. --- 2323,2327 ---- for k, v in vdict.items(): t[k]=_quote(v) ! elif isinstance(vdict, StringType) or isinstance(vdict, UnicodeType): # Note: a string is a SequenceType, but is treated as a single # entity, not a sequence of characters. *************** *** 2789,2798 **** 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: --- 2789,2798 ---- if type(obj) is StringType: return obj ! elif isinstance(obj, UnicodeType): return obj.encode(*self.conn.client_encoding) elif type(obj) in (ListType, TupleType): converted_obj = [] for item in obj: ! if isinstance(item, UnicodeType): converted_obj.append(item.encode(*self.conn.client_encoding)) else: *************** *** 2802,2806 **** converted_obj = {} for k, v in obj.items(): ! if type(v) is UnicodeType: converted_obj[k] = v.encode(*self.conn.client_encoding) else: --- 2802,2806 ---- converted_obj = {} for k, v in obj.items(): ! if isinstance(v, UnicodeType): converted_obj[k] = v.encode(*self.conn.client_encoding) else: *************** *** 2810,2814 **** 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 --- 2810,2814 ---- obj = copy.copy(obj) for k, v in obj.items(): ! if isinstance(v, UnicodeType): obj[k] = v.encode(*self.conn.client_encoding) return obj |
From: Billy G. A. <bal...@us...> - 2004-07-31 20:26:36
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17453 Modified Files: README README.html Log Message: 31JUL2004 bga - Corrected the names of the PG_True and PG_False constants in the README document(s). [Bug #1001178] Index: README =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/README,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** README 14 Jul 2003 21:35:57 -0000 1.32 --- README 31 Jul 2004 20:26:25 -0000 1.33 *************** *** 241,245 **** PgBoolean constants: ! PgTrue, PgFalse 2.1.3 libpq Methods --- 241,245 ---- PgBoolean constants: ! PG_True, PG_False 2.1.3 libpq Methods *************** *** 378,382 **** *Returns*: ! PgTrue or PgFalse based on the value of 'object' 2.1.3.7 PgInt2 --- 378,382 ---- *Returns*: ! PG_True or PG_False based on the value of 'object' 2.1.3.7 PgInt2 Index: README.html =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/README.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README.html 5 Dec 2002 05:34:30 -0000 1.1 --- README.html 31 Jul 2004 20:26:25 -0000 1.2 *************** *** 285,289 **** <p>PgBoolean constants:</p> <blockquote> ! PgTrue, PgFalse</blockquote> </blockquote> </div> --- 285,289 ---- <p>PgBoolean constants:</p> <blockquote> ! PG_True, PG_False</blockquote> </blockquote> </div> *************** *** 431,435 **** </dd> <dt><em>Returns</em>:</dt> ! <dd>PgTrue or PgFalse based on the value of 'object'</dd> </dl> </div> --- 431,435 ---- </dd> <dt><em>Returns</em>:</dt> ! <dd>PG_True or PG_False based on the value of 'object'</dd> </dl> </div> |
From: Billy G. A. <bal...@us...> - 2004-07-31 20:20:23
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16822/pyPgSQL Modified Files: PgSQL.py Log Message: 31JUL2004 bga - Fixed mis-spelling of __comm to __conn. [Bug #1001242] Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** PgSQL.py 10 May 2004 03:34:03 -0000 1.42 --- PgSQL.py 31 Jul 2004 20:20:13 -0000 1.43 *************** *** 30,33 **** --- 30,35 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 31JUL2004 bga - Fixed mis-spelling of __comm to __conn. | + # [Bug #1001242] | # 09MAY2004 bga - Added a 'debug' attribute to the Connection object. | # 18JAN2004 bga - Fixed problem with a SELECT ... INTO query. PgSQL | *************** *** 838,842 **** return value elif type(value) is IntType: ! return PgLargeObject(self.__comm.conn, value) else: return PgBytea(value) --- 840,844 ---- return value elif type(value) is IntType: ! return PgLargeObject(self.__conn.conn, value) else: return PgBytea(value) |
From: Billy G. A. <bal...@us...> - 2004-05-10 03:34:13
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8739 Modified Files: pgconnection.c pgconnection.h setup.py Log Message: 09MAY2003 bga Added a debug feature to the libpq.PgConnection object and to the PgSQL.Connection object to allow the query to be executed to be printed to STDOUT in either text or HTML format. Index: pgconnection.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgconnection.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pgconnection.c 27 Jun 2003 03:01:20 -0000 1.19 --- pgconnection.c 10 May 2004 03:34:03 -0000 1.20 *************** *** 29,32 **** --- 29,33 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 09MAY2004 bga Added a 'debug' feature to the PgConnection object. | | 26JUN2003 bga Fixed a bug I introduced into lo_import. | | 15JUN2003 bga Applied patch by Laurent Pinchart to correct a problem | *************** *** 148,152 **** self->bePID = Py_BuildValue("i", PQbackendPID(conn)); self->socket = Py_BuildValue("i", PQsocket(conn)); ! self->showQuery = 0; if (PyErr_Occurred()) --- 149,154 ---- self->bePID = Py_BuildValue("i", PQbackendPID(conn)); self->socket = Py_BuildValue("i", PQsocket(conn)); ! self->debug = Py_None; ! Py_INCREF(Py_None); if (PyErr_Occurred()) *************** *** 200,203 **** --- 202,206 ---- Py_XDECREF(self->version); Py_XDECREF(self->notices); + Py_XDECREF(self->debug); PyObject_Del(self); *************** *** 273,276 **** --- 276,339 ---- /*--------------------------------------------------------------------------*/ + static char *debugQuery(char *debug, char *query) + { + if ((strcasecmp(debug, "div") == 0) || + (strcasecmp(debug, "pre") == 0) || + (strcasecmp(debug, "html") == 0)) + { + char *_tag = NULL; + PyObject *_query = NULL; + PyObject *_fmt = NULL; + PyObject *_tmp = NULL; + PyObject *_res = NULL; + + if (strcasecmp(debug, "div") == 0) + _tag = "div"; + else + _tag = "pre"; + + _fmt = PyString_FromString("<%s style='background: #aaaaaa; " + "border: thin dashed #333333'>" + "%s</%s>"); + if (_fmt == (PyObject *)NULL) goto ErrorExit10; + + _query = PyString_FromString(query); + if (_query == (PyObject *)NULL) goto ErrorExit10; + + /** + * The 'replace' method call will either return a copy of the original + * string (with the reference count incremented) if no replacements + * were made, or a copy of the string with a replacements made. + */ + _tmp = PyObject_CallMethod(_query, "replace", "ss", "&", "&"); + if (_tmp == (PyObject *)NULL) goto ErrorExit10; + Py_XDECREF(_query); + _query = _tmp; + _tmp = PyObject_CallMethod(_query, "replace", "ss", "<", "<"); + if (_tmp == (PyObject *)NULL) goto ErrorExit10; + Py_XDECREF(_query); + _query = _tmp; + _tmp = PyObject_CallMethod(_query, "replace", "ss", ">", ">"); + if (_tmp == (PyObject *)NULL) goto ErrorExit10; + Py_XDECREF(_query); + _query = _tmp; + _tmp = Py_BuildValue("(sOs)", _tag, _query, _tag); + _res = PyString_Format(_fmt, _tmp); + puts(PyString_AsString(_res)); + ErrorExit10: + Py_XDECREF(_fmt); + Py_XDECREF(_query); + Py_XDECREF(_tmp); + Py_XDECREF(_res); + if (PyErr_Occurred() != NULL) + return NULL; + } else { + printf("QUERY: %s\n", query); + } + return ""; + } + + /*--------------------------------------------------------------------------*/ + static char libPQexec_Doc[] = "query() -- Submit a query and wait for the result(s)."; *************** *** 288,293 **** return NULL; ! if (self->showQuery) ! fprintf(stderr, "QUERY: %s\n", query); Py_BEGIN_ALLOW_THREADS --- 351,358 ---- return NULL; ! if (self->debug != Py_None) { ! if (debugQuery(PyString_AsString(self->debug), query) == NULL) ! return NULL; ! } Py_BEGIN_ALLOW_THREADS *************** *** 371,376 **** return NULL; ! if (self->showQuery) ! fprintf(stderr, "QUERY: %s\n", query); if (!PQsendQuery(PgConnection_Get(self), query)) --- 436,443 ---- return NULL; ! if (self->debug != Py_None) { ! if (debugQuery(PyString_AsString(self->debug), query) == NULL) ! return NULL; ! } if (!PQsendQuery(PgConnection_Get(self), query)) *************** *** 581,584 **** --- 648,652 ---- Py_XDECREF(self->version); self->version = Py_None; Py_XINCREF(Py_None); Py_XDECREF(self->notices); self->notices = Py_None; Py_XINCREF(Py_None); + Py_XDECREF(self->debug); self->debug = Py_None; Py_XINCREF(Py_None); Py_INCREF(Py_None); *************** *** 1072,1075 **** --- 1140,1144 ---- { "isBusy", T_INT, 0, RO }, { "isnonblocking", T_INT, 0, RO }, + { "debug", T_OBJECT, CoOFF(debug), 0 }, { NULL } }; *************** *** 1165,1170 **** if (!strcmp(attr, "toggleShowQuery")) { ! self->showQuery = (self->showQuery ? 0 : 1); ! return Py_BuildValue("s", (self->showQuery ? "On" : "Off")); } --- 1234,1247 ---- if (!strcmp(attr, "toggleShowQuery")) { ! if (self->debug != Py_None) ! { ! self->debug = Py_None; ! Py_INCREF(Py_None); ! } ! else ! { ! self->debug = PyString_FromString("text"); ! } ! return self->debug; } *************** *** 1172,1175 **** --- 1249,1258 ---- } + static int PgConnection_setattr(PgConnection *self, char* attr, + PyObject *val) + { + return PyMember_Set((char *)self, PgConnection_members, attr, val); + } + /*--------------------------------------------------------------------------*/ *************** *** 1185,1189 **** (printfunc)NULL, /* tp_print */ (getattrfunc)PgConnection_getattr, /* tp_getattr */ ! (setattrfunc)NULL, /* tp_setattr */ NULL, /* tp_compare */ (reprfunc)PgConnection_repr, /* tp_repr */ --- 1268,1272 ---- (printfunc)NULL, /* tp_print */ (getattrfunc)PgConnection_getattr, /* tp_getattr */ ! (setattrfunc)PgConnection_setattr, /* tp_setattr */ NULL, /* tp_compare */ (reprfunc)PgConnection_repr, /* tp_repr */ Index: pgconnection.h =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgconnection.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pgconnection.h 13 Oct 2001 20:40:35 -0000 1.2 --- pgconnection.h 10 May 2004 03:34:03 -0000 1.3 *************** *** 52,56 **** PyObject *notices; PyObject *cinfo; ! int showQuery; } PgConnection; --- 52,57 ---- PyObject *notices; PyObject *cinfo; ! PyObject *debug; ! } PgConnection; Index: setup.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/setup.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** setup.py 14 Jul 2003 21:02:02 -0000 1.22 --- setup.py 10 May 2004 03:34:03 -0000 1.23 *************** *** 102,107 **** library_dirs = YOUR_LIST_HERE elif sys.platform == "linux2": ! include_dirs = ["/usr/include", "/usr/include/postgresql", ! "/usr/include/pgsql"] library_dirs = ["/usr/lib"] --- 102,106 ---- library_dirs = YOUR_LIST_HERE elif sys.platform == "linux2": ! include_dirs = ["/usr/include", "/usr/local/pgsql/include"] library_dirs = ["/usr/lib"] *************** *** 155,160 **** else: # Assume a Unixish system ! include_dirs = ["/usr/local/include"] ! library_dirs = ["/usr/local/lib"] # patch distutils if it can't cope with the "classifiers" keyword --- 154,159 ---- else: # Assume a Unixish system ! include_dirs = ["/usr/local/include", "/usr/local/pgsql/include"] ! library_dirs = ["/usr/local/lib", "/usr/local/pgsql/lib"] # patch distutils if it can't cope with the "classifiers" keyword *************** *** 184,188 **** maintainer_email = "pyp...@li...", url = "http://pypgsql.sourceforge.net/", ! licence = "Python", packages = ["pyPgSQL", "pyPgSQL.libpq"], ext_modules = [Extension( --- 183,187 ---- maintainer_email = "pyp...@li...", url = "http://pypgsql.sourceforge.net/", ! license = "Python", packages = ["pyPgSQL", "pyPgSQL.libpq"], ext_modules = [Extension( |
From: Billy G. A. <bal...@us...> - 2004-05-10 03:34:13
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8739/pyPgSQL Modified Files: PgSQL.py Log Message: 09MAY2003 bga Added a debug feature to the libpq.PgConnection object and to the PgSQL.Connection object to allow the query to be executed to be printed to STDOUT in either text or HTML format. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** PgSQL.py 7 Feb 2004 22:36:11 -0000 1.41 --- PgSQL.py 10 May 2004 03:34:03 -0000 1.42 *************** *** 30,33 **** --- 30,34 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 09MAY2004 bga - Added a 'debug' attribute to the Connection object. | # 18JAN2004 bga - Fixed problem with a SELECT ... INTO query. PgSQL | # will no longer use a portal for these queires. | *************** *** 302,305 **** --- 303,313 ---- the execute method. + cursor.debug + Setting this attribute to 'text' will cause the query that will + be executed to be displayed to STDOUT. If it is set to 'pre' or + 'div', the query will be displayed to STDOUT within a <pre> or + <dif> HTML block. If it is set to None (the default), the query + will not be displayed. + NOTE: In order to use a PostgreSQL portal (i.e. DECLARE ... CURSOR FOR ...), the word SELECT must be the first word in the query, *************** *** 2376,2379 **** --- 2384,2388 ---- self.__dict__["_isOpen"] = 1 self.__dict__["_cache"] = TypeCache(self) + self.__dict__["debug"] = self.conn.debug if noWeakRef: self.__dict__["cursors"] = [] *************** *** 2460,2463 **** --- 2469,2475 ---- elif name in ('unicode_results', 'client_encoding'): self.__dict__[name] = value + elif name == 'debug': + self.conn.debug = value + self.__dict__["debug"] = self.conn.debug elif self.__dict__.has_key(name): raise AttributeError, "%s is read-only." % name |
From: Billy G. A. <bal...@us...> - 2004-02-07 22:39:07
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24464/pyPgSQL Modified Files: PgSQL.py Log Message: 18JAN2004 bga - Fixed problem with a SELECT ... INTO query. PgSQL will no longer use a portal for these queires. [Bug #879531] --- - Applied patch by Ben Burton to fix the "FutureWarning (negative integers and signed strings)" problem. [Bug #863925] Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** PgSQL.py 17 Dec 2003 05:27:19 -0000 1.40 --- PgSQL.py 7 Feb 2004 22:36:11 -0000 1.41 *************** *** 30,33 **** --- 30,39 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 18JAN2004 bga - Fixed problem with a SELECT ... INTO query. PgSQL | + # will no longer use a portal for these queires. | + # [Bug #879531] | + # --- - Applied patch by Ben Burton to fix the "FutureWarning | + # (negative integers and signed strings)" problem. | + # [Bug #863925] | # 16DEC2003 bga - Fixed problem with PgNumeric._quote() method where a | # PgNumeric with a value of zero was quoted to NULL in- | *************** *** 429,432 **** --- 435,439 ---- re_DRI = re.compile('[\s]*DROP[\s]+INDEX[\s]', re.I) re_4UP = re.compile('[\s]FOR[\s]+UPDATE', re.I) + re_IN2 = re.compile('[\s]INTO[\s]', re.I) replace = string.replace *************** *** 2673,2677 **** if isRefCursor: raise TypeError, "Reference cursor requires a name." ! name = "PgSQL_%08X" % id(self) elif type(name) is not StringType: raise TypeError, "Cursor name must be a string." --- 2680,2684 ---- if isRefCursor: raise TypeError, "Reference cursor requires a name." ! name = "PgSQL_%08X" % long(id(self)) elif type(name) is not StringType: raise TypeError, "Cursor name must be a string." *************** *** 3049,3053 **** if re_DQL.search(query) and \ ! not (noPostgresCursor or re_4UP.search(query)): _qstr = 'DECLARE "%s" CURSOR FOR %s' % (self.name, query) self.closed = 0 --- 3056,3062 ---- if re_DQL.search(query) and \ ! not (noPostgresCursor or ! re_IN2.search(query) or ! re_4UP.search(query)): _qstr = 'DECLARE "%s" CURSOR FOR %s' % (self.name, query) self.closed = 0 |
From: Billy G. A. <bal...@us...> - 2003-12-17 05:27:23
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1:/tmp/cvs-serv30799/pyPgSQL Modified Files: PgSQL.py Log Message: 16DEC2003 bga - Fixed problem in TypeCache.typecast() when creating large objects from an OID. The problem also occurred in TypeCache.handleArray(). [Bug #855987]. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** PgSQL.py 17 Dec 2003 04:57:32 -0000 1.39 --- PgSQL.py 17 Dec 2003 05:27:19 -0000 1.40 *************** *** 33,36 **** --- 33,39 ---- # PgNumeric with a value of zero was quoted to NULL in- | # stead of 0. | + # --- - Fixed problem in TypeCache.typecast() when creating | + # large objects from an OID. The problem also occurred | + # in TypeCache.handleArray(). [Bug #855987]. | # 22NOV2003 bga - Fix problem with PgNumeric.__rmul__() method. | # [Bug #841530] | *************** *** 820,824 **** return value elif type(value) is IntType: ! return PgLargeObject(self.conn, value) else: return PgBytea(value) --- 823,827 ---- return value elif type(value) is IntType: ! return PgLargeObject(self.__comm.conn, value) else: return PgBytea(value) *************** *** 883,887 **** lst[_i] = PgBytea(lst[_i]) else: ! lst[_i] = PgLargeObject(self.conn, int(lst[_i])) return lst --- 886,890 ---- lst[_i] = PgBytea(lst[_i]) else: ! lst[_i] = PgLargeObject(self.__conn.conn, int(lst[_i])) return lst |
From: Billy G. A. <bal...@us...> - 2003-12-17 04:57:36
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1:/tmp/cvs-serv26408/pyPgSQL Modified Files: PgSQL.py Log Message: 16DEC2003 bga - Fixed problem with PgNumeric._quote() method where a PgNumeric with a value of zero was quoted to NULL in stead of 0. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** PgSQL.py 22 Nov 2003 05:35:47 -0000 1.38 --- PgSQL.py 17 Dec 2003 04:57:32 -0000 1.39 *************** *** 30,34 **** # Date Ini Description | # --------- --- ------------------------------------------------------- | ! # 22NOV2003 bga - Fix problem with PgNumeric.__rmul__ method(). | # [Bug #841530] | # 22OCT2003 bga - Completed the cleanup of parameter handling in the | --- 30,37 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | ! # 16DEC2003 bga - Fixed problem with PgNumeric._quote() method where a | ! # PgNumeric with a value of zero was quoted to NULL in- | ! # stead of 0. | ! # 22NOV2003 bga - Fix problem with PgNumeric.__rmul__() method. | # [Bug #841530] | # 22OCT2003 bga - Completed the cleanup of parameter handling in the | *************** *** 1675,1679 **** def _quote(self, forArray=0): ! if self.__v: if forArray: return '"%s"' % self.__fmtNumeric() --- 1678,1682 ---- def _quote(self, forArray=0): ! if self.__v != None: if forArray: return '"%s"' % self.__fmtNumeric() |
From: Billy G. A. <bal...@us...> - 2003-11-22 05:35:50
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1:/tmp/cvs-serv27272/pyPgSQL Modified Files: PgSQL.py Log Message: 22NOV2003 bga - Fix problem with PgNumeric.__rmul__ method(). [Bug #841530] Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** PgSQL.py 23 Oct 2003 17:24:51 -0000 1.37 --- PgSQL.py 22 Nov 2003 05:35:47 -0000 1.38 *************** *** 30,33 **** --- 30,35 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 22NOV2003 bga - Fix problem with PgNumeric.__rmul__ method(). | + # [Bug #841530] | # 22OCT2003 bga - Completed the cleanup of parameter handling in the | # cursor.execute() method. | *************** *** 1604,1608 **** def __rmul__(self, other): ! return self.__mul__(self, other) def __imul__(self, other): --- 1606,1610 ---- def __rmul__(self, other): ! return self.__mul__(other) def __imul__(self, other): |
From: Billy G. A. <bal...@us...> - 2003-11-10 05:11:04
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv4937 Modified Files: libpqmodule.c Log Message: 09NOV2003 bga Fixed a buffer overrun error in libPQquoteBytea based on a fix by James Matthew Farrow. [Bug #838317]. Index: libpqmodule.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** libpqmodule.c 17 Jun 2003 01:28:30 -0000 1.29 --- libpqmodule.c 10 Nov 2003 05:11:00 -0000 1.30 *************** *** 32,35 **** --- 32,37 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 09NOV2003 bga Fixed a buffer overrun error in libPQquoteBytea based | + | on a fix by James Matthew Farrow. [Bug #838317]. | | 16JUN2003 gh On win32, we usually statically link against libpq. | | Because of fortunate circumstances, a problem didn't | *************** *** 365,369 **** sout[j++] = (forArray ? '"' : '\''); - sout[j] = (char)0; result = Py_BuildValue("s#", sout, j); --- 367,370 ---- *************** *** 411,416 **** } } - - sout[j] = (char)0; result = Py_BuildValue("s#", sout, j); --- 412,415 ---- |
From: Billy G. A. <bal...@us...> - 2003-10-24 11:34:29
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1:/tmp/cvs-serv5431/pyPgSQL Modified Files: PgSQL.py Log Message: 22OCT2003 bga - Completed the cleanup of parameter handling in the cursor.execute() method. - Cleaned up the parameter handling in the cursor.callproc() method. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** PgSQL.py 22 Oct 2003 05:27:49 -0000 1.36 --- PgSQL.py 23 Oct 2003 17:24:51 -0000 1.37 *************** *** 30,33 **** --- 30,37 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 22OCT2003 bga - Completed the cleanup of parameter handling in the | + # cursor.execute() method. | + # - Cleaned up the parameter handling in the | + # cursor.callproc() method. | # 20OCT2003 bga - Fixed the quoting of lists/tuples passed in to the | # cursor.execute method for use with the SQL 'IN' oper- | *************** *** 2244,2248 **** return _j[:-1] + "}'" ! def _quote(value): """ _quote(value) -> string --- 2248,2252 ---- return _j[:-1] + "}'" ! def _quote(value, forProc=False): """ _quote(value) -> string *************** *** 2268,2275 **** elif isinstance(value, StringType): return PgQuoteString(value) ! elif type(value) in [DictType, ListType, TupleType]: ! return _quoteall(value) ! elif isinstance(value, PgResultSet): ! return _quoteall(value) elif isinstance(value, LongType): return str(value) --- 2272,2283 ---- elif isinstance(value, StringType): return PgQuoteString(value) ! elif type(value) is DictType or isinstance(value, PgResultSet): ! raise TypeError, "dictionary or PgResultSet not allowed here" ! elif type(value) in [ListType, TupleType]: ! if forProc: ! raise TypeError, "lists or tuples not allowed here" ! return "(" + \ ! reduce(lambda x, y: x + ", " + y, tuple(map(_quote, value))) + \ ! ")" elif isinstance(value, LongType): return str(value) *************** *** 2277,2280 **** --- 2285,2291 ---- return repr(value) + def _procQuote(value): + return _quote(value, True) + def _quoteall(vdict): """ *************** *** 2292,2298 **** t = (_quote(vdict), ) elif type(vdict) in [ListType, TupleType]: ! t = "(" + \ ! reduce(lambda x, y: x + ", " + y, tuple(map(_quote, vdict))) + \ ! ")" else: raise TypeError, \ --- 2303,2307 ---- t = (_quote(vdict), ) elif type(vdict) in [ListType, TupleType]: ! t = tuple(map(_quote, vdict)) else: raise TypeError, \ *************** *** 2929,2941 **** proc = self.__unicodeConvert(proc) ! args = self.__unicodeConvert(args) ! _qstr = "select %s(" % proc ! for _i in range(len(args)): ! _qstr = '%s%s, ' % (_qstr, _quote(args[_i])) ! if len(args) == 0: ! _qstr = '%s)' % _qstr ! else: ! _qstr = '%s)' % _qstr[:-2] _nl = len(self.conn.notices) --- 2938,2950 ---- proc = self.__unicodeConvert(proc) ! if len(args) == 0: ! args = "()" ! else: ! args = "(" + \ ! reduce(lambda x, y: x + ", " + y, ! tuple(map(_procQuote, ! self.__unicodeConvert(args)))) + ")" ! _qstr = "select %s%s" % (proc, args) _nl = len(self.conn.notices) *************** *** 3002,3012 **** self.closed = 1 ! def execute(self, *parms): ! if len(parms) == 0: ! raise TypeError, "execute() takes at least 2 arguments (1 given)" ! else: ! query = parms[0] # Get the query from the list of parameters ! parms = parms[1:] # and adjust the parameter list. ! if self.closed: raise InterfaceError, "execute failed - the cursor is closed." --- 3011,3015 ---- self.closed = 1 ! def execute(self, query, *parms): if self.closed: raise InterfaceError, "execute failed - the cursor is closed." *************** *** 3057,3063 **** # If there are no paramters, just execute the query. self.res = self.conn.conn.query(_qstr) ! else: ! parms = self.__unicodeConvert(parms) ! parms = tuple(map(_quote, parms)); self.res = self.conn.conn.query(_qstr % parms) self._rows_ = self.res.ntuples --- 3060,3072 ---- # If there are no paramters, just execute the query. self.res = self.conn.conn.query(_qstr) ! else: ! if len(parms) == 1 and \ ! (type(parms[0]) in [DictType, ListType, TupleType] or \ ! isinstance(parms[0], PgResultSet)): ! parms = _quoteall(self.__unicodeConvert(parms[0])) ! self.res = self.conn.conn.query(_qstr % parms) ! else: ! parms = self.__unicodeConvert(parms) ! parms = tuple(map(_quote, self.__unicodeConvert(parms))); self.res = self.conn.conn.query(_qstr % parms) self._rows_ = self.res.ntuples |
From: Billy G. A. <bal...@us...> - 2003-10-23 02:50:33
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1:/tmp/cvs-serv3091/pyPgSQL Modified Files: PgSQL.py Log Message: 20OCT2003 bga - Fixed the quoting of lists/tuples passed in to the cursor.execute method for use with the SQL 'IN' opertor. ALso cleaned up the handling of parameters in cursor.execute(). Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** PgSQL.py 14 Jul 2003 21:19:20 -0000 1.35 --- PgSQL.py 22 Oct 2003 05:27:49 -0000 1.36 *************** *** 30,33 **** --- 30,37 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 20OCT2003 bga - Fixed the quoting of lists/tuples passed in to the | + # cursor.execute method for use with the SQL 'IN' oper- | + # tor. ALso cleaned up the handling of parameters in | + # cursor.execute(). | # 05JUL2003 bga - Fixed a problem with PgNumeric where an exception can | # be thrown if the stated scale and precision of the | *************** *** 2251,2258 **** if value is None: ! return 'NULL' ! elif hasattr(value, '_quote'): ! return value._quote() ! elif type(value) is DateTimeType: return "'%s'" % value elif type(value) is DateTimeDeltaType: --- 2255,2266 ---- if value is None: ! return 'NULL' ! ! try: ! return value._quote() ! except AttributeError: ! pass ! ! if type(value) is DateTimeType: return "'%s'" % value elif type(value) is DateTimeDeltaType: *************** *** 2260,2263 **** --- 2268,2275 ---- elif isinstance(value, StringType): return PgQuoteString(value) + elif type(value) in [DictType, ListType, TupleType]: + return _quoteall(value) + elif isinstance(value, PgResultSet): + return _quoteall(value) elif isinstance(value, LongType): return str(value) *************** *** 2280,2284 **** t = (_quote(vdict), ) elif type(vdict) in [ListType, TupleType]: ! t = tuple(map(_quote, vdict)) else: raise TypeError, \ --- 2292,2298 ---- t = (_quote(vdict), ) elif type(vdict) in [ListType, TupleType]: ! t = "(" + \ ! reduce(lambda x, y: x + ", " + y, tuple(map(_quote, vdict))) + \ ! ")" else: raise TypeError, \ *************** *** 2988,2992 **** self.closed = 1 ! def execute(self, query, *parms): if self.closed: raise InterfaceError, "execute failed - the cursor is closed." --- 3002,3012 ---- self.closed = 1 ! def execute(self, *parms): ! if len(parms) == 0: ! raise TypeError, "execute() takes at least 2 arguments (1 given)" ! else: ! query = parms[0] # Get the query from the list of parameters ! parms = parms[1:] # and adjust the parameter list. ! if self.closed: raise InterfaceError, "execute failed - the cursor is closed." *************** *** 3038,3049 **** self.res = self.conn.conn.query(_qstr) else: ! if len(parms) == 1 and \ ! (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) self._rows_ = self.res.ntuples --- 3058,3063 ---- self.res = self.conn.conn.query(_qstr) else: ! parms = self.__unicodeConvert(parms) ! parms = tuple(map(_quote, parms)); self.res = self.conn.conn.query(_qstr % parms) self._rows_ = self.res.ntuples |
From: Billy G. A. <bal...@us...> - 2003-10-06 19:40:27
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv11243 Modified Files: pgversion.c Log Message: 06OCT2004 bga Corrected a typing error in the previous commit. Index: pgversion.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgversion.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pgversion.c 6 Oct 2003 18:35:31 -0000 1.20 --- pgversion.c 6 Oct 2003 19:40:23 -0000 1.21 *************** *** 190,194 **** if ((pgstricmp(last, "alpha") == 0) || (pgstricmp(last, "beta") == 0)) ! return (error != 0); /* Allow for release canidates */ --- 190,194 ---- if ((pgstricmp(last, "alpha") == 0) || (pgstricmp(last, "beta") == 0)) ! return (errno != 0); /* Allow for release canidates */ |
From: Billy G. A. <bal...@us...> - 2003-10-06 18:37:00
|
Update of /cvsroot/pypgsql/pypgsql/test In directory sc8-pr-cvs1:/tmp/cvs-serv30734/test Modified Files: PgSQLTestCases.py Log Message: 06OCT2004 bga [Bug #816729] Updated tests for PostgreSQL 7.4(beta). Thanks to Jeff Putnam for the fixes. Index: PgSQLTestCases.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/test/PgSQLTestCases.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** PgSQLTestCases.py 1 Dec 2002 04:59:25 -0000 1.25 --- PgSQLTestCases.py 6 Oct 2003 18:36:56 -0000 1.26 *************** *** 33,36 **** --- 33,38 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 06OCT2004 bga [Bug #816729] Updated tests for PostgreSQL 7.4(beta). | + # Thanks to Jeff Putnam for the fixes. | # 30NOV2002 bga Updated tests for PostgreSQL 7.3. | # 10NOV2002 bga Added an additional PgNumeric class check. | *************** *** 616,620 **** """Test execute() with a singleton string as the parameter.""" ! if self.vstr.startswith("7.3"): flen = 11 elif self.vstr.startswith("7.2"): --- 618,624 ---- """Test execute() with a singleton string as the parameter.""" ! if self.vstr.startswith("7.4"): ! flen = 11 ! elif self.vstr.startswith("7.3"): flen = 11 elif self.vstr.startswith("7.2"): *************** *** 799,803 **** # Note: We only have to check for the minor version number in order # to determine the needed row counts. ! rc = { '7.3':124, '7.2':101, '7.1':80, '7.0':65, '6.5':47 } v = self.vstr --- 803,807 ---- # Note: We only have to check for the minor version number in order # to determine the needed row counts. ! rc = { '7.4':137, '7.3':124, '7.2':101, '7.1':80, '7.0':65, '6.5':47 } v = self.vstr |
From: Billy G. A. <bal...@us...> - 2003-10-06 18:35:35
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv27505 Modified Files: pgversion.c Log Message: 06OCT2004 bga [Bug #786712 & #816729] Allowed for a version string containing the words "alpha" and "beta". Thanks to Gerhard Quell and Jeff Putman for the fixes. Index: pgversion.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgversion.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pgversion.c 1 Dec 2002 22:10:51 -0000 1.19 --- pgversion.c 6 Oct 2003 18:35:31 -0000 1.20 *************** *** 32,35 **** --- 32,38 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 06OCT2004 bga [Bug #786712 & #816729] Allowed for a version string | + | containing the words "alpha" and "beta". | + | Thanks to Gerhard Quell and Jeff Putman for the fixes. | | 26NOV2002 bga Allowed for release canidate (rcN) version strings. | | 16SEP2002 gh Reflect the change to the unconditionally included | *************** *** 185,188 **** --- 188,195 ---- return (errno != 0); + if ((pgstricmp(last, "alpha") == 0) || + (pgstricmp(last, "beta") == 0)) + return (error != 0); + /* Allow for release canidates */ if ((*last == 'r') && (*(last+1) == 'c') && isdigit(*(last+2))) *************** *** 246,250 **** */ PyErr_SetString(PyExc_ValueError, ! "Ivalid format for PgVersion construction."); --- 253,257 ---- */ PyErr_SetString(PyExc_ValueError, ! "Invalid format for PgVersion construction."); |
From: Billy G. A. <bal...@us...> - 2003-07-16 04:28:52
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv12426 Modified Files: Announce ChangeLog Log Message: 15JUL2003 bga Corrected spelling mistake(s). Index: Announce =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/Announce,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Announce 14 Jul 2003 21:21:10 -0000 1.23 --- Announce 16 Jul 2003 04:28:49 -0000 1.24 *************** *** 19,24 **** Note: It is highly recommended that you use PostgreSQL 7.2 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: --- 19,24 ---- Note: It is highly recommended that you use PostgreSQL 7.2 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, or later because of ! a bug in earlier 2.2 versions. Project homepages: *************** *** 76,80 **** * Corrected problem found by Adam Buraczewski in the __setupTransaction function. ! * Allow both 'e' and 'E' to signify an exponet in the PgNumeric constructor. * Correct some problems that were missed in yesterday's fixes (Thanks, Adam, for the help with the problems) --- 76,80 ---- * Corrected problem found by Adam Buraczewski in the __setupTransaction function. ! * Allow both 'e' and 'E' to signify an exponent in the PgNumeric constructor. * Correct some problems that were missed in yesterday's fixes (Thanks, Adam, for the help with the problems) Index: ChangeLog =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/ChangeLog,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ChangeLog 14 Jul 2003 21:21:10 -0000 1.20 --- ChangeLog 16 Jul 2003 04:28:49 -0000 1.21 *************** *** 46,50 **** * Corrected problem found by Adam Buraczewski in the __setupTransaction function. ! * Allow both 'e' and 'E' to signify an exponet in the PgNumeric constructor. * Correct some problems that were missed in yesterday's fixes (Thanks, Adam, for the help with the problems) --- 46,50 ---- * Corrected problem found by Adam Buraczewski in the __setupTransaction function. ! * Allow both 'e' and 'E' to signify an exponent in the PgNumeric constructor. * Correct some problems that were missed in yesterday's fixes (Thanks, Adam, for the help with the problems) |
From: Gerhard H?r. <gha...@us...> - 2003-07-15 21:57:00
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv15922 Modified Files: pyPgSQL.spec Log Message: 16JUL2003 gh Updated RPM spec file for version 2.4. Index: pyPgSQL.spec =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL.spec,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pyPgSQL.spec 1 Dec 2002 22:25:58 -0000 1.5 --- pyPgSQL.spec 15 Jul 2003 21:56:57 -0000 1.6 *************** *** 1,5 **** %define name pyPgSQL ! %define version 2.3 ! %define release 1 # automatically set GCC flags based on version --- 1,5 ---- %define name pyPgSQL ! %define version 2.4 ! %define release 0 # automatically set GCC flags based on version *************** *** 64,67 **** --- 64,70 ---- %changelog + * Wed Jul 16 2003 Gerhard Häring <gh...@gh...> + - Changed version number to 2.4. + * Sun Dec 01 2002 Gerhard Häring <ger...@gm...> - Changed Vendor field to the pyPgSQL developers list. |
From: Billy G. A. <bal...@us...> - 2003-07-14 21:36:00
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv7471 Modified Files: README Log Message: 14JUL2003 bga Updated for release 2.4. Index: README =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/README,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** README 10 Jul 2003 15:36:19 -0000 1.31 --- README 14 Jul 2003 21:35:57 -0000 1.32 *************** *** 2,6 **** ---------------------------------------------------------------------------- ! pyPgSQL - v2.3: Python DB-API 2.0 Compliant Interface Module for PostgreSQL. ---------------------------------------------------------------------------- =============================== --- 2,6 ---- ---------------------------------------------------------------------------- ! pyPgSQL - v2.4: Python DB-API 2.0 Compliant Interface Module for PostgreSQL. ---------------------------------------------------------------------------- =============================== *************** *** 8,12 **** =============================== ! pyPgSQL, version 2.3 A Python DB-API 2.0 compliant interface for PostgreSQL Copyright 2000 by Billy G. Allie. --- 8,12 ---- =============================== ! pyPgSQL, version 2.4 A Python DB-API 2.0 compliant interface for PostgreSQL Copyright 2000 by Billy G. Allie. *************** *** 1672,1677 **** When working with PostgreSQL large object, you MUST be in a transaction. The code will try to ensure that a transaction is active while working with ! 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.) ---------------------------------------------------------------------------- --- 1672,1683 ---- When working with PostgreSQL large object, you MUST be in a transaction. The code will try to ensure that a transaction is active while working with ! large object (i.e. lo_open will start a transaction if necessary.) ! ! ---------------------------------------------------------------------------- ! ! There is a change to the Connection.binary() function that *could* cause ! existing code to break. Connection.binary() no longer commits the trans- ! action used to create the large object. The application developer is now ! responsible for commiting (or rolling back) the transaction. ---------------------------------------------------------------------------- |
From: Billy G. A. <bal...@us...> - 2003-07-14 21:27:42
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv5767 Modified Files: pgnotify.c Log Message: 14JUL2003 bga Corrected a date (2002 -> 2003) in the flower box. Index: pgnotify.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgnotify.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pgnotify.c 29 May 2003 01:39:21 -0000 1.7 --- pgnotify.c 14 Jul 2003 21:27:38 -0000 1.8 *************** *** 30,34 **** | Date Ini Description | | --------- --- ------------------------------------------------------- | ! | 28MAY2002 bga Fixed a bug in the code. The code in question use to | | work, but doesn't anymore (possible change to libpq?). | | 06SEP2001 bga Clarified an embedded assignment within an if test. | --- 30,34 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | ! | 28MAY2003 bga Fixed a bug in the code. The code in question use to | | work, but doesn't anymore (possible change to libpq?). | | 06SEP2001 bga Clarified an embedded assignment within an if test. | |
From: Billy G. A. <bal...@us...> - 2003-07-14 21:25:41
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1:/tmp/cvs-serv5544/pyPgSQL Modified Files: __init__.py Log Message: 14JUL2003 bga Updated for release 2.4. Index: __init__.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/__init__.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** __init__.py 1 Dec 2002 19:34:08 -0000 1.4 --- __init__.py 14 Jul 2003 21:25:34 -0000 1.5 *************** *** 32,34 **** """ ! __version__ = "2.3" --- 32,34 ---- """ ! __version__ = "2.4" |
From: Billy G. A. <bal...@us...> - 2003-07-14 21:21:14
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv4874 Modified Files: Announce ChangeLog Log Message: 14JUL2003 bga Updated for release 2.4. Index: Announce =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/Announce,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Announce 6 Dec 2002 05:29:37 -0000 1.22 --- Announce 14 Jul 2003 21:21:10 -0000 1.23 *************** *** 1,6 **** ! Announce: pyPgSQL - Version 2.3 is released. =========================================================================== ! pyPgSQL v2.3 has been released. It is available at http://pypgsql.sourceforge.net. --- 1,6 ---- ! Announce: pyPgSQL - Version 2.4 is released. =========================================================================== ! pyPgSQL v2.4 has been released. It is available at http://pypgsql.sourceforge.net. *************** *** 27,206 **** Python: http://www.python.org/ - 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.py 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. - - Support for reference cursors was added. Since PostgreSQL 7.2, you could - create cursors in PL/pgSQL and pass a reference to the open cursor back to - the client. PgSQL will now cast those referenced cursors into a Cursor - object that can be used to fetch the results in the cursor. For example - (assuming that mmYearInfo() returns a reference curosr): - - $ python - Python 2.2.2 (#7, Nov 27 2002, 17:10:05) [C] on openunix8 - Type "help", "copyright", "credits" or "license" for more information. - >>> from pyPgSQL import PgSQL - >>> cx = PgSQL.connect(database='esi') - >>> cu = cx.cursor() - >>> cu.callproc('mmYearInfo') - >>> rs = cu.fetchone() - >>> rs - [<pyPgSQL.PgSQL.Cursor instance at 0x818495c>] - >>> c = rs[0] - >>> for i in c.description: - ... print i - ... - ['model_year', varchar, 4, 8, None, None, None, 0] - ['mktg_div_name', varchar, 50, 54, None, None, None, 0] - ['model_desc', varchar, 50, 54, None, None, None, 0] - ['book_types', varchar, 50, 54, None, None, None, 0] - ['vehicle_syskey', integer, 4, 4, None, None, None, 0] - >>> r = c.fetchone() - >>> r - ['2003', 'Buick', 'Century', '1;8;9', 2211] - >>> - --------------------------------------------------------------------------- ChangeLog: =========================================================================== ! Changes since pyPgSQL Version 2.2 ================================= ! The following source code files were added to Version 2.3 of pyPgSQL: ! ! 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.3. ! * 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 ------------------- ! * Fixed various problems with the PgNumeric constructor and formatting ! routines. ! * Fixed problems with new __setupTransaction function: | ! 1. Made it a method of Connection, not Cursor. ! 2. inTransaction was only set if TransactionLevel was set. ! * Fixed instances where method name was incorrect: ! Connection__gcCursor -> _Connection__gcCursor ! Connection__closeCursor -> _Connection__closeCursor ! * Cleaned up code where there was unneeded references to conn in Connection ! class. | ! * Handle the new '__quote__' method for arrays, too. ! * Still handle '_quote' methods for backwards compatibility. ! * Fixed changed PG_TIMESTAMP oid, added PG_TIMESTAMPTZ and PG_REFCURSOR oids. ! * Reference cursors are now type-casted into cursor objects. ! * Completed the emulation of a String object for the PgBytea and PgOther ! classes. This corrects several problems with PgBytea concerning compari- ! sons, using PgBytea types as keys in dictionaries, etc. ! * Added the __hash__ function to the PgNumeric class. Cleaned up the code ! in PgNumeric class and made some small improvments to it. ! * Added the PgArray class. This is a wrapper around a Python list and is ! used for all PostgreSQL arrays. This change was made so that lists and ! tuples no longer have a special meaning in the Cursor.execute() method. ! * Changed the quoting methods defined in the various classes defining ! PostgreSQL support types to __quote__. ! * 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 changed PG_TIMESTAMP oid, added PG_TIMESTAMPTZ and PG_REFCURSOR ! oids. [Bug #845360] ! * Fixed the format string of ParseTuple in libPQbool_FromInt. ! This closes a bug that appeared on Linux/Alpha (#625121). ! ! Changes to pgversion.c: ! ----------------------- ! * Changed pgversion to recognize release canidate versions of PostgreSQL. ! ! Changes to PgSQL test cases: ! ---------------------------- ! * Updated test cases to allow for changes in PostgreSQL 7.3. ! * 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. --- 27,119 ---- Python: http://www.python.org/ --------------------------------------------------------------------------- ChangeLog: =========================================================================== ! Changes since pyPgSQL Version 2.3 ================================= ! =-=-=-=-=-=-=-=-=-=-=-=-=- ** IMPORTANT NOTE ** =-=-=-=-=-=-=-=-=-=-=-=-=-= ! NOTE: There is a change to the Connection.binary() function that *could* ! cause existing code to break. Connection.binary() no longer commits ! the transaction used to create the large object. The application ! developer is now responsible for commiting (or rolling back) the ! transaction. ! -=-=-=-=-=-=-=-=-=-=-=-=-= ** IMPORTANT NOTE ** -=-=-=-=-=-=-=-=-=-=-=-=-=- Changes to README ----------------- ! * Updates for 2.4. ! Changes to PgSQL.py ------------------- ! * Applied patch from Laurent Pinchart to allow _quote to correctly process ! objects that are sub-classed from String and Long types. ! * Change the name of the quoting function back to _quote. Variables named ! like __*__ should be restrict to system names. ! * PgTypes is now hashable. repr() of a PgType will now return the repr() ! of the underlying OID. ! * Connection.binary() will now fail if autocommit is enabled. ! * Connection.binary() will no longer commit the transaction after creating ! the large object. The application developer is now responsible for ! commiting (or for rolling back) the transaction [Bug #747525]. ! * Added PG_TIMETZ to the mix [Patch #708013]. ! * Pg_Money will now accept a string as a parameter. ! * PostgreSQL int2, int, int4 will now be cast into Python ints. Int8 will ! be cast into a Python long. Float4, float8, and money types will be ! cast into a Python float. ! * Correct problem with the PgNumeric.__radd__ method. [Bug #694358] ! * Correct problem with conversion of negitive integers (with a given scale ! and precision) to PgNumerics. [Bug #694358] ! * Work around a problem where the precision and scale of a query result ! can be different from the first result in the result set. [Bug #697221] ! * Change the code so that the display length in the cursor.description ! attribute is always None instead of '-1'. ! * Fixed another problem with interval <-> DateTimeDelta casting. ! * Corrected a problem that caused the close of a portal (ie. PostgreSQL ! cursor) to fail. ! * Corrected a problem with interval <-> DateTimeDelta casting. [Bug #653044] ! * Corrected problem found by Adam Buraczewski in the __setupTransaction ! function. ! * Allow both 'e' and 'E' to signify an exponet in the PgNumeric constructor. ! * Correct some problems that were missed in yesterday's fixes (Thanks, ! Adam, for the help with the problems) ! Changes to libpqmodule.c ! ------------------------ ! * On win32, we usually statically link against libpq. Because of ! fortunate circumstances, a problem didn't show up until now: we need to ! call WSAStartup() to initialize the socket stuff from Windows *in our ! module* in order for the statically linked libpq to work. I just took ! the relevant DllMain function from the libpq sources and put it here. ! * Modified some comments to reflect reality. ! * Applied patch from Laurent Pinchart: In libPQquoteString, bytea are ! quoted using as much as 5 bytes per input byte (0x00 is quoted '\\000'), ! so allocating (slen * 4) + 3 is not enough for data that contain lots of ! 0x00 bytes. ! * Added PG_TIMETZ to the mix [Patch #708013]. ! ! Changes to pgboolean.c ! ---------------------- ! * Change the name of the quoting function back to _quote. __*__ type ! names should be restricted to system names. + Changes to pgconnection.c + ------------------------- + * Applied patch by Laurent Pinchart to correct a problem lo_import, + lo_export, lo_unlink. + * In case PQgetResult returns NULL, let libPQgetResult return a Python + None, like the docstring says. This is necessary in order to be able + to cancel queries, as after cancelling a query with PQrequestCancel, + we need to read results until PQgetResult returns NULL. + Changes to pglargeobject.c -------------------------- ! * Change the name of the quoting function back to _quote. __*__ type ! names should be restricted to system names. ! Changes to pgnotify.c ! --------------------- ! * Fixed a bug in the code. The code in question use to work, but doesn't ! anymore (possible change to libpq?). Index: ChangeLog =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/ChangeLog,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ChangeLog 6 Dec 2002 05:29:37 -0000 1.19 --- ChangeLog 14 Jul 2003 21:21:10 -0000 1.20 *************** *** 1,4 **** --- 1,91 ---- #ident "$Id$" + Changes since pyPgSQL Version 2.3 + ================================= + + =-=-=-=-=-=-=-=-=-=-=-=-=- ** IMPORTANT NOTE ** =-=-=-=-=-=-=-=-=-=-=-=-=-= + NOTE: There is a change to the Connection.binary() function that *could* + cause existing code to break. Connection.binary() no longer commits + the transaction used to create the large object. The application + developer is now responsible for commiting (or rolling back) the + transaction. + -=-=-=-=-=-=-=-=-=-=-=-=-= ** IMPORTANT NOTE ** -=-=-=-=-=-=-=-=-=-=-=-=-=- + + Changes to README + ----------------- + * Updates for 2.4. + + Changes to PgSQL.py + ------------------- + * Applied patch from Laurent Pinchart to allow _quote to correctly process + objects that are sub-classed from String and Long types. + * Change the name of the quoting function back to _quote. Variables named + like __*__ should be restrict to system names. + * PgTypes is now hashable. repr() of a PgType will now return the repr() + of the underlying OID. + * Connection.binary() will now fail if autocommit is enabled. + * Connection.binary() will no longer commit the transaction after creating + the large object. The application developer is now responsible for + commiting (or for rolling back) the transaction [Bug #747525]. + * Added PG_TIMETZ to the mix [Patch #708013]. + * Pg_Money will now accept a string as a parameter. + * PostgreSQL int2, int, int4 will now be cast into Python ints. Int8 will + be cast into a Python long. Float4, float8, and money types will be + cast into a Python float. + * Correct problem with the PgNumeric.__radd__ method. [Bug #694358] + * Correct problem with conversion of negitive integers (with a given scale + and precision) to PgNumerics. [Bug #694358] + * Work around a problem where the precision and scale of a query result + can be different from the first result in the result set. [Bug #697221] + * Change the code so that the display length in the cursor.description + attribute is always None instead of '-1'. + * Fixed another problem with interval <-> DateTimeDelta casting. + * Corrected a problem that caused the close of a portal (ie. PostgreSQL + cursor) to fail. + * Corrected a problem with interval <-> DateTimeDelta casting. [Bug #653044] + * Corrected problem found by Adam Buraczewski in the __setupTransaction + function. + * Allow both 'e' and 'E' to signify an exponet in the PgNumeric constructor. + * Correct some problems that were missed in yesterday's fixes (Thanks, + Adam, for the help with the problems) + + Changes to libpqmodule.c + ------------------------ + * On win32, we usually statically link against libpq. Because of + fortunate circumstances, a problem didn't show up until now: we need to + call WSAStartup() to initialize the socket stuff from Windows *in our + module* in order for the statically linked libpq to work. I just took + the relevant DllMain function from the libpq sources and put it here. + * Modified some comments to reflect reality. + * Applied patch from Laurent Pinchart: In libPQquoteString, bytea are + quoted using as much as 5 bytes per input byte (0x00 is quoted '\\000'), + so allocating (slen * 4) + 3 is not enough for data that contain lots of + 0x00 bytes. + * Added PG_TIMETZ to the mix [Patch #708013]. + + Changes to pgboolean.c + ---------------------- + * Change the name of the quoting function back to _quote. __*__ type + names should be restricted to system names. + + Changes to pgconnection.c + ------------------------- + * Applied patch by Laurent Pinchart to correct a problem lo_import, + lo_export, lo_unlink. + * In case PQgetResult returns NULL, let libPQgetResult return a Python + None, like the docstring says. This is necessary in order to be able + to cancel queries, as after cancelling a query with PQrequestCancel, + we need to read results until PQgetResult returns NULL. + + Changes to pglargeobject.c + -------------------------- + * Change the name of the quoting function back to _quote. __*__ type + names should be restricted to system names. + + Changes to pgnotify.c + --------------------- + * Fixed a bug in the code. The code in question use to work, but doesn't + anymore (possible change to libpq?). + Changes since pyPgSQL Version 2.2 ================================= *************** *** 34,43 **** * Remove out of date warning about PostgreSQL on win32 * Reflected change from windows/ to ports/ ! Changes to PgSQL.py ------------------- * Fixed various problems with the PgNumeric constructor and formatting routines. ! * Fixed problems with new __setupTransaction function: | 1. Made it a method of Connection, not Cursor. 2. inTransaction was only set if TransactionLevel was set. --- 121,130 ---- * Remove out of date warning about PostgreSQL on win32 * Reflected change from windows/ to ports/ ! Changes to PgSQL.py ------------------- * Fixed various problems with the PgNumeric constructor and formatting routines. ! * Fixed problems with new __setupTransaction function: 1. Made it a method of Connection, not Cursor. 2. inTransaction was only set if TransactionLevel was set. *************** *** 46,50 **** Connection__closeCursor -> _Connection__closeCursor * Cleaned up code where there was unneeded references to conn in Connection ! class. | * Handle the new '__quote__' method for arrays, too. * Still handle '_quote' methods for backwards compatibility. --- 133,137 ---- Connection__closeCursor -> _Connection__closeCursor * Cleaned up code where there was unneeded references to conn in Connection ! class. * Handle the new '__quote__' method for arrays, too. * Still handle '_quote' methods for backwards compatibility. |
From: Billy G. A. <bal...@us...> - 2003-07-14 21:19:24
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory sc8-pr-cvs1:/tmp/cvs-serv4291a/pyPgSQL Modified Files: PgSQL.py Log Message: 05JUL2003 bga - Fixed a problem with PgNumeric where an exception can be thrown if the stated scale and precision of the returned in the first result row does not match later rows. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** PgSQL.py 27 Jun 2003 03:03:08 -0000 1.34 --- PgSQL.py 14 Jul 2003 21:19:20 -0000 1.35 *************** *** 30,33 **** --- 30,37 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 05JUL2003 bga - Fixed a problem with PgNumeric where an exception can | + # be thrown if the stated scale and precision of the | + # returned in the first result row does not match later | + # rows. | # 26JUN2003 bga - Applied patch from Laurent Pinchart to allow _quote | # to correctly process objects that are sub-classed | *************** *** 783,787 **** # of the current field does not match the precision and # scale of the first record in the result set (there are ! # a few reasons that this can happen). Let PgNumeric # figure out a precision and scale from the value. return PgNumeric(value) --- 787,791 ---- # of the current field does not match the precision and # scale of the first record in the result set (there are ! # a few reasons why this can happen). Let PgNumeric # figure out a precision and scale from the value. return PgNumeric(value) *************** *** 839,843 **** lst[_i] = PgInt8(lst[_i]) elif _ftv == PG_NUMERIC: ! lst[_i] = PgNumeric(lst[_i], _p, _s) elif _ftv == PG_INT2: lst[_i] = PgInt2(lst[_i]) --- 843,855 ---- lst[_i] = PgInt8(lst[_i]) elif _ftv == PG_NUMERIC: ! try: ! lst[_i] = PgNumeric(lst[_i], _p, _s) ! except OverflowError: ! # If we reached this point, then the precision and scale ! # of the current field does not match the precision and ! # scale of the first record in the result set (there are ! # a few reasons why this can happen). Let PgNumeric ! # figure out a precision and scale from the value. ! lst[_i] = PgNumeric(lst[_i]) elif _ftv == PG_INT2: lst[_i] = PgInt2(lst[_i]) |
From: Billy G. A. <bal...@us...> - 2003-07-14 21:02:05
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv32557 Modified Files: setup.py Log Message: 14JUL2003 bga Updated file for the 2.4 release. Added support for the SCO OpenUnix OS. Index: setup.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/setup.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** setup.py 25 Apr 2003 00:34:03 -0000 1.21 --- setup.py 14 Jul 2003 21:02:02 -0000 1.22 *************** *** 77,81 **** from distutils.extension import Extension ! __version__ = "2.3" # Define the runtime library path for this module. It starts out as None. --- 77,81 ---- from distutils.extension import Extension ! __version__ = "2.4" # Define the runtime library path for this module. It starts out as None. *************** *** 109,112 **** --- 109,117 ---- include_dirs.append("../" * 5) elif sys.platform[:8] == "unixware": + LOCALBASE = os.environ.get('LOCALBASE', '/usr/local/pgsql') + include_dirs = ['%s/include' % LOCALBASE] + library_dirs = ['%s/lib' % LOCALBASE] + pypgsql_rt_dirs = library_dirs + elif sys.platform[:8] == "openunix": LOCALBASE = os.environ.get('LOCALBASE', '/usr/local/pgsql') include_dirs = ['%s/include' % LOCALBASE] |
From: Gerhard H?r. <gha...@us...> - 2003-07-12 17:25:25
|
Update of /cvsroot/pypgsql/pypgsql/test/regression In directory sc8-pr-cvs1:/tmp/cvs-serv7224/regression Modified Files: array.py unicode_tests.py Log Message: 12JUL2003 gh Add coding cookies in files containing umlauts to silence warnings that occur under Python 2.3. Index: array.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/test/regression/array.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** array.py 3 Nov 2002 19:53:22 -0000 1.3 --- array.py 12 Jul 2003 17:19:06 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- #!/usr/local/bin/python + #-*- coding: ISO-8859-1 -*- #ident "@(#) $Id$" # vi:set sw=4 ts=8 showmode ai: Index: unicode_tests.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/test/regression/unicode_tests.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** unicode_tests.py 27 Oct 2002 06:01:13 -0000 1.2 --- unicode_tests.py 12 Jul 2003 17:19:06 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- #!/usr/bin/env python + #-*- coding: ISO-8859-1 -*- #ident "@(#) $Id$" #-----------------------------------------------------------------------+ |