Search Postgresql Archives

Re: Is there a better way to do this?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Glaesemann <grzm@xxxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux