From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | AT TIME ZONE and interval arguments |
Date: | 2013-01-31 08:39:54 |
Message-ID: | 510A2DDA.60301@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all
I'm mildly thrown by this:
regress=> SELECT TIME '04:00' AT TIME ZONE '01:00';
timezone
-------------
19:00:00-01
(1 row)
regress=> SELECT TIME '04:00' AT TIME ZONE (INTERVAL '01:00');
timezone
-------------
21:00:00+01
(1 row)
regress=> SELECT TIME '04:00' AT TIME ZONE (TEXT '01:00');
timezone
-------------
19:00:00-01
(1 row)
and was wondering if anyone knows why the sense of the offset is
reversed for typed intervals vs bare literal or text. Is this another
one of the issues caused by the various standards' disagreements about +
vs - time offsets?
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2013-01-31 08:49:47 | Re: Optimizing query? |
Previous Message | Stuart Bishop | 2013-01-31 07:28:37 | Re: Is there a way to add a detail message in a warning with pl/Python? |