From: Karsten H. <Kar...@gm...> - 2004-09-29 06:20:25
|
> -------------------------- > from pyPgSQL import PgSQL > from mx.DateTime import * > > db = PgSQL.connect(dsn="localhost", database="test") > cursor = db.cursor() > > rightnow = now() > cursor.execute("insert into dailylog values (%s)", rightnow) > -------------------------- > > That column in PostgreSQL was defined as a 'timestamp' type. Erm, *which* column ? You certainly don't say in your insert query. Likely you are thinking it inserts into one column while it actually does insert into another. > libpq.OperationalError: ERROR: value too long for type character varying(4) Look out for varchar(4) columns in your table. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |