[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [GENERAL] Can't figure out how to use now() in default for tsrange  column (PG 9.2)
From:       "Kevin Grittner" <Kevin.Grittner () wicourts ! gov>
Date:       2012-07-31 16:35:51
Message-ID: 5017C31702000025000492D3 () gw ! wicourts ! gov
[Download RAW message or body]

Chris Bartlett <c.bartlett@paradise.net.nz> wrote:
 
> my column is a timestamp without time zone.
 
In spite of the fact that this was sort of tangential to you primary
question, I'm a little surprised that nobody responded to this
point.  There are very, very few situations where the semantics of
TIMESTAMP WITHOUT TIME ZONE are really what people want; you should
seriously consider using TIMESTAMP WITH TIME ZONE.  In PostgreSQL
neither one actually stores a time zone; the difference is that WITH
TIME ZONE it represents a particular moment in a continuous stream
of time, while WITHOUT TIME ZONE the value can be interpreted to be
any of various times depending on the time zone of the reader. 
WITHOUT TIME ZONE you will see time jump around at daylight saving
time boundaries, and you will tend to have ambiguous times after the
clock has moved backward, where you can't tell what actual moment is
intended.
 
As you noted, now() is TIMESTAMP WITH TIME ZONE -- it has to be,
because it represents a moment in time.
 
-Kevin

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic