Re: Interval and mx.TimeDelta

Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Organization initd.org
Message-ID <[email protected]>
Il giorno ven, 30/05/2008 alle 00.16 +0100, Eoghan Murray ha scritto:
> Hi,
> 
> I'm trying to use mx.TimeDelta with an postgres interval data type
> (through SQLAlchemy)
> My psycopg version is:
> 2.0.6 (dec mx dt ext pq3)
> 
> It all works fine until I get to dates greater than a day;
> ProgrammingError: (ProgrammingError) invalid input syntax for type
> interval: "1:00:00:00.00"
> I assume this should be in the format: "24:00:00.00"

Can you please compile psycopg with debug enabled, run it with the
environment variable PSYCOPG_DEBUG=1 and send me the whole log? I looked
at the code and I don't see any reason for the error. It seems that
somehow an mx.TimeDelta is being converted to string and that is sent to
the db instead of the correctly adapted type; but I can't be sure
without a trace.

federico

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                [email protected]
INIT.D Developer                                           fog-NGVKUo/i/[email protected]
                                   God is in the rain... -- Evey Hammond

_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIQRNgvcCgrgZGjesRAhIQAJ9j4v1o/HEyEYG0Muxgnm+YzilP0wCgtBix
v8uCR0DangmzlglvGjP5N6E=
=J7RK
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.