Re: Timestamp weirdness

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: oliver(at)opencloud(dot)com, emergency(dot)shower(at)gmail(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Timestamp weirdness
Date: 2005-07-26 18:06:13
Message-ID: 17144.1122401173@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> You're saying that a timestampz read from the protocol stream on the
> server side is always parsed into a TIMESTAMP WITH TIME ZONE. When it
> is assigned to a TIMESTAMP WITHOUT TIME ZONE, there is a cast.

No, he's not saying that. He's saying that *if* the server initially
converts to timestamptz and then timestamp, there's a problem. It won't
ordinarily do that unless told to ... but sending the parameter
explicitly typed as timestamptz tells it to. So part of the problem
here is that the driver is sending all Timestamp parameters explicitly
typed as timestamptz, which it does because it hasn't got any very good
basis for knowing whether the value is going to be assigned to a
timestamptz or plain timestamp column.

regards, tom lane

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christian Cryder 2005-07-26 19:23:16 Configuring Connections
Previous Message Dave Cramer 2005-07-26 18:05:25 Re: Timestamp weirdness