agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
Which Java class in the new java.time package shall be used to mapped timestamp?
2+ messages / 2 participants
[nested] [flat]

* Which Java class in the new java.time package shall be used to mapped timestamp?
@ 2014-03-11 21:54 Vernon E <vwu98034@lycos.com>
  2014-03-11 22:37 ` Re: Which Java class in the new java.time package shall be used to mapped timestamp? David Wall <d.wall@computer.org>
  0 siblings, 1 reply; 2+ messages in thread

From: Vernon E @ 2014-03-11 21:54 UTC (permalink / raw)
  To: pgsql-interfaces

<div>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:</div>
<div>&nbsp;</div>
<div>
<pre>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.<br /><br />Which class I shall use?<br /><br /><br /><br /></pre>
</div>




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Which Java class in the new java.time package shall be used to mapped timestamp?
  2014-03-11 21:54 Which Java class in the new java.time package shall be used to mapped timestamp? Vernon E <vwu98034@lycos.com>
@ 2014-03-11 22:37 ` David Wall <d.wall@computer.org>
  0 siblings, 0 replies; 2+ messages in thread

From: David Wall @ 2014-03-11 22:37 UTC (permalink / raw)
  To: 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.



-- 
Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2014-03-11 22:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 21:54 Which Java class in the new java.time package shall be used to mapped timestamp? Vernon E <vwu98034@lycos.com>
2014-03-11 22:37 ` David Wall <d.wall@computer.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox