Implicit conversion from string to timestamp

From: David Goodenough <david(dot)goodenough(at)btconnect(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Implicit conversion from string to timestamp
Date: 2006-02-17 10:16:20
Message-ID: 200602171016.20769.david.goodenough@btconnect.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have some generic code to which I pass a series of values to be inserted
into a PostgreSQL table which includes a field which is defined as a timestamp
and which I wish to populate with a string of the form
"yyyy-MM-dd hh:mm:ss.SSS". Under pg 8 and before this worked fine
but now with 8.1 I seem to be getting an exception which reads:-

ERROR: column "created" is of type timestamp without time zone but expression
is of type character varying

All this is done using JDBC (so I suppose it might be a JDBC error).

I know that a number of things were tightened up with 8.1, is this one of
them? Or should I be asking this on the JDBC list.

I had thought that passing strings into timestamps was acceptable.

David

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chad 2006-02-17 10:43:53 Re: How do I use the backend APIs
Previous Message Martijn van Oosterhout 2006-02-17 09:21:04 Re: How do I use the backend APIs