From: SourceForge.net <no...@so...> - 2006-12-06 20:46:12
|
Patches item #1609701, was opened at 2006-12-05 18:59 Message generated for change (Comment added) made by kenlalonde You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316528&aid=1609701&group_id=16528 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ken Lalonde (kenlalonde) Assigned to: Nobody/Anonymous (nobody) Summary: Interval parsing bug Initial Comment: PgSQL.py 2.5.1 uses int() to parse the time part of a postgres interval string. When the seconds part contains a decimal, int() will throw a ValueError. The attached patch just discards the decimal part, since mx.DateTime.RelativeTime stores seconds as an integer. ---------------------------------------------------------------------- >Comment By: Ken Lalonde (kenlalonde) Date: 2006-12-06 15:46 Message: Logged In: YES user_id=203927 Originator: YES To be clear, here's a simple example that demonstrates the bug. We assume Db credentials are in the environment: from pyPgSQL import PgSQL db = PgSQL.connect() cur = db.cursor() cur.execute("select interval '2 years 3 days 12:34:56.78'") cur.fetchall() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316528&aid=1609701&group_id=16528 |