pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pg@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Timestamp Conversion Woes Redux
Date: Fri, 22 Jul 2005 11:30:12 -0500
Message-ID: <s2e0d8d7.045@gwmta.wicourts.gov> (raw)

Argh!  I've found some comments on this thread confusing, and I've
discovered the source of this confusion -- I was thinking that a column
defined as type "timestamp with time zone" would store a time zone with
the timestamp.  (Really, I did read the documentation on data types, but
the discussion of how this data type is implemented slid right out of my
head.)  I will have to review everything with the actual implementation
in mind; I now see why this is more complicated than I thought.
 
Could someone confirm that a timestamp column in a PostgreSQL database
never contains time zone data, regardless of whether or not the "with
time zone" clause was used in its definition.  It seems to me that, if
you ignore internals of how the data is stored (which an application
programmer never need see), the only difference between "timestamp with
time zone" and "timestamp without time zone" is whether a time zone
specified in a literal will (a) be used to determine what moment the
timestamp represents or (b) be ignored in favor of using the server's
time zone to determine what moment the timestamp represents.  In either
case, the value returned when querying the column will be based on the
server's time zone.  Do I have that right?
 
-Kevin
 




view thread (92+ messages)  latest in thread

Message-ID: <s2e0d8d7.045@gwmta.wicourts.gov>
Permalink:  ../s2e0d8d7.045@gwmta.wicourts.gov/
Also on:    postgresql.org/message-id/s2e0d8d7.045@gwmta.wicourts.gov

 · 

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: Kevin.Grittner@wicourts.gov, pg@fastcrypt.com
  Subject: Re: Timestamp Conversion Woes Redux
  In-Reply-To: <s2e0d8d7.045@gwmta.wicourts.gov>
  References: <s2e0d8d7.045@gwmta.wicourts.gov>

* 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