Re: Is there a better way to do this?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Cc: Wei Weng <wweng(at)kencast(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Is there a better way to do this?
Date: 2007-08-29 00:30:20
Message-ID: 16118.1188347420@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Glaesemann <grzm(at)seespotcode(dot)net> writes:
> Note that interval '1 day' is not equal to interval '24 hours'. '1
> day' can be 23 or 25 hours across daylight saving time boundaries.

When you are adding to timestamp without time zone, they *are*
interchangeable, since no daylight-savings arithmetic is involved.
Michael's right for the case of adding to timestamp with time zone,
though.

> Do you *really* want timestamp without time zone?

I agree with that comment --- you should at least think hard
about what you are trying to represent. The "date" type is also
worth considering if time-of-day isn't so important to you.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-08-29 00:34:05 Re: Out of Memory - 8.2.4
Previous Message D. Dante Lorenso 2007-08-29 00:24:42 Re: Is there a better way to do this?