Re: Can't figure out how to use now() in default for tsrange column (PG 9.2) - Mailing list pgsql-general

From Kevin Grittner
Subject Re: Can't figure out how to use now() in default for tsrange column (PG 9.2)
Date
Msg-id 5017C31702000025000492D3@gw.wicourts.gov
Whole thread Raw
In response to Re: Can't figure out how to use now() in default for tsrange column (PG 9.2)  (Chris Bartlett <c.bartlett@paradise.net.nz>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Rajeev rastogi
Date:
Subject: Regarding pgTAP
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Regarding pgTAP