Re: Which Java class in the new java.time package shall be used to mapped timestamp?

From: David Wall <d(dot)wall(at)computer(dot)org>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Which Java class in the new java.time package shall be used to mapped timestamp?
Date: 2014-03-11 22:37:46
Message-ID: 531F903A.5030604@computer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On 3/11/2014 2:54 PM, Vernon E wrote:
> I have tried both LocalDateTime (without time zone informatio) and
> ZonedDateTime (with time zone information) in the new java.time
> package and get a same error:
> column "registeration_datetime" is of type timestamp without time zone but expression is of type bytea
> Hint: You will need to rewrite or cast the expression.
>
> Which class I shall use?

java.sql.Timestamp is the normal type that maps to a PG timestamp field,
and I'd recommend TIMESTAMP WITH TIME ZONE unless you are sure the time
part is really not important.

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Florian Weimer 2014-03-19 20:28:07 Re: PQunescapebytea not reverse of PQescapebytea?
Previous Message Vernon E 2014-03-11 21:54:36 Which Java class in the new java.time package shall be used to mapped timestamp?