pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: oliver@opencloud.com
Cc: emergency.shower@gmail.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Timestamp weirdness
Date: Tue, 26 Jul 2005 14:06:13 -0400
Message-ID: <17144.1122401173@sss.pgh.pa.us> (raw)
In-Reply-To: <s2e631c3.025@gwmta.wicourts.gov>
References: <s2e631c3.025@gwmta.wicourts.gov>

"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



view thread (20+ messages)  latest in thread

Message-ID: <17144.1122401173@sss.pgh.pa.us>
Permalink:  ../17144.1122401173@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17144.1122401173@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov, oliver@opencloud.com, emergency.shower@gmail.com
  Subject: Re: Timestamp weirdness
  In-Reply-To: <17144.1122401173@sss.pgh.pa.us>
  References: <s2e631c3.025@gwmta.wicourts.gov> <17144.1122401173@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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