Re: Python Interface - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Python Interface
Date
Msg-id 20050210213702.GA72513@winnie.fuhr.org
Whole thread Raw
In response to Re: Python Interface  (James Thompson <jamest@ajrs.com>)
List pgsql-general
On Thu, Feb 10, 2005 at 01:29:42PM -0600, James Thompson wrote:

> Though if IIRC it does round timestamps which can burn a person at times :)
> I don't have a test case to verify if my memory is correct about this though.

Actually, I think it's just that mxDateTime defaults to displaying
times as HH:MM:SS.ss, but the extra precision does appear to be there:

In psql:

SELECT tm FROM foo;
       tm
-----------------
 14:32:41.219443

In Python:

curs.execute('SELECT tm FROM foo')
row = curs.dictfetchone()
print row['tm']
14:32:41.21
print row['tm'].second
41.219443

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Christoph Pingel
Date:
Subject: Re: no self-joins in views? - works now!
Next
From: Michael Fuhr
Date:
Subject: Re: Functions with more than 32 parameters