|
From: <yu...@ad...> - 2004-05-28 14:19:28
|
Quoting Atli Thorbjornsson <at...@ga...>:
> Hi again,
> I keep getting segfaults whenever I try to retrieve a timestamp in
pydb2
> without first converting it to a string via char(). I realise one should
> probably always cast first anyway but I have a lot of inexperienced python
> programmers working under my supervision and segfaults are rather scary.
> Shouldn't this either work or just be caught in an exception printing
> something informative out instead of the timestamp?
>
> Example:
>
> import DB2
>
> conn = DB2.connect()
> curs = conn.cursor()
>
> curs.execute("select intime from hra where intime > current timestamp -
> dec(120000,6)"
> one_row = curs.fetchone()
> print one_row[0]
> curs.close()
> del curs
> conn.close()
> del conn
>
>
> intime is a timestamp in table hra. This segfaults in pydb2 on
> (curs.fetchone()) but obviously runs fine on command line.
>
> If you point me in the right direction I might even be able to do it for you
> ;)
>
> Atli Thorbjornsson.
This is an old bug (segfault when querying a timestamp field) - we fixed it i
think. What version are you using ?
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
|