Re: TimeStamp problem... - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: TimeStamp problem...
Date
Msg-id 2013.1043161175@sss.pgh.pa.us
Whole thread Raw
In response to TimeStamp problem...  ("Vitali Petrov" <vitalipetrov@hotmail.com>)
List pgsql-jdbc
"Vitali Petrov" <vitalipetrov@hotmail.com> writes:
> Then I insert new values with timestamp into table I get an error:
> Can anyone tell why?

> Code:
> PreparedStatement newPStat ...
> newPStat.setTimestamp(1, Timestamp.valueOf("2003-01-21 12:25:14"));
> newPStat.executeUpdate();

> Error:
> java.sql.SQLException: ERROR:  pg_atoi: error in "2003-01-21
> 12:25:14.000000+02": can't parse "-01-21 12:25:14.000000+02"

Since the complaint is coming from pg_atoi, it would seem that this
string is being fed to an integer column, not a timestamp column at
all.  Check your SQL...

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Tony Grant
Date:
Subject: Re: Open Office
Next
From: J M Okomba
Date:
Subject: Re: Open Office