Re: Problem with DATE - Mailing list pgsql-jdbc

From Vinayak
Subject Re: Problem with DATE
Date
Msg-id 1421386506791-5834215.post@n5.nabble.com
Whole thread Raw
In response to Re: Problem with DATE  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: Problem with DATE  (Dave Cramer <pg@fastcrypt.com>)
Re: Problem with DATE  (dmp <danap@ttc-cmc.net>)
List pgsql-jdbc
Hi Dave,
Thank you for explanation.

I understood that the behavior of date is different in PostgreSQL and Java.
PostgreSQL DATE type return date part only.
Java DATE return date and time with timezone.
>I am guessing what you really want is to just take the date in your Oracle
db, load it into java and store >it into postgresql without  any
transformation.
>This would require a custom date type.
I have created custom date type which return date and time in PostgreSQL.
postgres=# select now()::date;
               now
---------------------------------
 2015-01-16 10:51:41
(1 row)
but still PreparedStatement throws error for date parameter.




-----
Regards,
Vinayak,

--
View this message in context: http://postgresql.nabble.com/Problem-with-DATE-tp5833008p5834215.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Problem with DATE
Next
From: Dave Cramer
Date:
Subject: Re: Problem with DATE