Re: Timestamp weirdness - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Timestamp weirdness
Date
Msg-id 17144.1122401173@sss.pgh.pa.us
Whole thread Raw
In response to Timestamp weirdness  ("emergency.shower@gmail.com" <emergency.shower@gmail.com>)
List pgsql-jdbc
"Kevin Grittner" <Kevin.Grittner@wicourts.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

pgsql-jdbc by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Timestamp weirdness
Next
From: Dave Cramer
Date:
Subject: Re: Timestamp weirdness