From: SourceForge.net <no...@so...> - 2004-11-18 17:20:46
|
Bugs item #1068856, was opened at 2004-11-18 12:20 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1068856&group_id=16528 Category: PgNumeric Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ken Lalonde (kenlalonde) Assigned to: Nobody/Anonymous (nobody) Summary: PgNumeric(0,10,2)._quote() == 'NULL' Initial Comment: A PgNumeric instance with value zero is incorrectly quoted as 'NULL' instead of '0'. Needless to say, this can have nasty consequences. Fix is trivial: in version 2.4 of PgSQL.py: --- PgSQL.py.old 2004-11-18 12:18:49.334613060 -0500 +++ PgSQL.py 2004-11-18 12:18:59.411482575 -0500 @@ -1664,7 +1664,7 @@ return PgNumeric(-self.__v, self.__p, self.__s) def _quote(self, forArray=0): - if self.__v: + if self.__v is not None: if forArray: return '"%s"' % self.__fmtNumeric() else: ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1068856&group_id=16528 |