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 |