From: SourceForge.net <no...@so...> - 2005-10-14 09:51:18
|
Bugs item #1325835, was opened at 2005-10-13 15:57 Message generated for change (Comment added) made by ghum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1325835&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: PgSQL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Harald Armin Massa (ghum) Assigned to: Billy G. Allie (ballie01) Summary: PyPGSQl crashes Python on specific dates Initial Comment: cs=cn.cursor() cs.execute("select '1932-01-01 00:00'::timestamp") cs.fetchone() leads to a total crash of Python ("invalid memory access"), not a mere exception, but a hard crash. to reproduce: cn must be a conneciton ... Harald ---------------------------------------------------------------------- >Comment By: Harald Armin Massa (ghum) Date: 2005-10-14 11:51 Message: Logged In: YES user_id=665785 updating my bad bugreport.. sorry for not being more precise in the first run. I use pyPgSQL-pre2.5-20050926.win32-py2.4.exe as PyPgSQL. Python is 2.4.1 (#65, Mar 30 2005) and also tested (same problem) Python 2.4.2 (#67, Sep 28 2005, 12:41:11) (both from python.org) libpq.dll is: PostgreSQL 8.1-beta3, installed from the installer libpq.dll from 12.10.2005 11:39 with 169.145 bytes mx.DateTime is Version 2.0.3 and also testet (same problem) Version 2.0.6 (all on win32, XP SP2) (and adding: yes, of course I do a select on a normal table where the timestamps do reside; NOT that I just cast a constant to crash Python :) ) ---------------------------------------------------------------------- Comment By: Billy G. Allie (ballie01) Date: 2005-10-14 07:04 Message: Logged In: YES user_id=8500 I'm not able to reproduce the error: >>> cn = PgSQL.connect(database='issueLog', password='********) >>> cur = cn.cursor() >>> cur.execute("select '1932-01-01 00:00'::timestamp") >>> res = cur.fetchone() >>> res [<DateTime object for '1932-01-01 00:00:00.00' at b7c58ec8>] >>> What version of Python / PostgreSQL / mxDateTime are you using? ---------------------------------------------------------------------- Comment By: Harald Armin Massa (ghum) Date: 2005-10-13 16:07 Message: Logged In: YES user_id=665785 additional information: its with the september 2005 version (interim) workaround: use to_char(datefield,'YYYY-MM-DD HH24:MI:SS') instead of datefield in your selects ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1325835&group_id=16528 |