From: Gerhard H?r. <gha...@us...> - 2002-08-03 06:03:43
|
Update of /cvsroot/pypgsql/pypgsql/pyPgSQL In directory usw-pr-cvs1:/tmp/cvs-serv22828/pyPgSQL Modified Files: PgSQL.py Log Message: 03AUG2002 gh - Fixed problem that occurs when a query on an OID field doesn't return any rows. [Bug #589370]. - Added the corresponding test case. Index: PgSQL.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pyPgSQL/PgSQL.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PgSQL.py 29 Jul 2002 01:00:44 -0000 1.12 --- PgSQL.py 3 Aug 2002 06:03:39 -0000 1.13 *************** *** 30,33 **** --- 30,35 ---- # Date Ini Description | # --------- --- ------------------------------------------------------- | + # 03AUG2002 gh Fixed problem that occurs when a query on an OID field | + # doesn't return any rows. [Bug #589370]. | # 29JUL2002 gh Applied patch #569203 and also added __pos__ and | # __abs__ special methods to PgNumeric. | *************** *** 2160,2168 **** _typ = _bt elif _typ.value == PG_OID: ! _p = _res.getvalue(0, _i) ! if type(_p) in [PgLargeObjectType, NoneType]: _typ = PgTypes(PG_BLOB) else: ! _typ = PgTypes(PG_ROWID) _j.append(_typ) --- 2162,2175 ---- _typ = _bt elif _typ.value == PG_OID: ! try: ! _p = _res.getvalue(0, _i) ! except (ValueError, TypeError), m: ! # We can only guess here ... _typ = PgTypes(PG_BLOB) else: ! if type(_p) in [PgLargeObjectType, NoneType]: ! _typ = PgTypes(PG_BLOB) ! else: ! _typ = PgTypes(PG_ROWID) _j.append(_typ) |