Lists: | pgsql-patches |
---|
From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | <pgsql-patches(at)postgresql(dot)org> |
Subject: | AT TIME ZONE with full timezones |
Date: | 2005-06-06 19:22:30 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE6C75E4@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
This patch makes it possible to use the full set of timezones when doing
"AT TIME ZONE", and not just the shorlist previously available. For
example:
SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
works fine now. It will also obey whatever DST rules were in effect at
just that date, which the previous implementation did not.
It also supports the AT TIME ZONE on the timetz datatype. The whole
handling of DST is a bit bogus there, so I chose to make it use whatever
DST rules are in effect at the time of executig the query. not sure if
anybody is actuallyi *using* timetz though, it seems pretty
unpredictable just because of this...
Docs updates forthcoming assuming this approach is considered good ;-)
//Magnus
Attachment | Content-Type | Size |
---|---|---|
timezones.patch | application/octet-stream | 26.7 KB |
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: AT TIME ZONE with full timezones |
Date: | 2005-06-08 20:29:20 |
Message-ID: | 10437.1118262560@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> This patch makes it possible to use the full set of timezones when doing
> "AT TIME ZONE", and not just the shorlist previously available.
> Docs updates forthcoming assuming this approach is considered good ;-)
Looks reasonable to me, please supply docs.
regards, tom lane
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Magnus Hagander <mha(at)sollentuna(dot)net> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: AT TIME ZONE with full timezones |
Date: | 2005-06-15 00:33:46 |
Message-ID: | 200506150033.j5F0XkS18816@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Patch applied. Thanks. Doc updates applied too.
---------------------------------------------------------------------------
Magnus Hagander wrote:
> This patch makes it possible to use the full set of timezones when doing
> "AT TIME ZONE", and not just the shorlist previously available. For
> example:
>
> SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
>
> works fine now. It will also obey whatever DST rules were in effect at
> just that date, which the previous implementation did not.
>
> It also supports the AT TIME ZONE on the timetz datatype. The whole
> handling of DST is a bit bogus there, so I chose to make it use whatever
> DST rules are in effect at the time of executig the query. not sure if
> anybody is actuallyi *using* timetz though, it seems pretty
> unpredictable just because of this...
>
> Docs updates forthcoming assuming this approach is considered good ;-)
>
> //Magnus
Content-Description: timezones.patch
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073