TODO-Item: full timezone names - Mailing list pgsql-patches

From Joachim Wieland
Subject TODO-Item: full timezone names
Date
Msg-id 20060601082517.GA7670@mcknight.de
Whole thread Raw
Responses Re: TODO-Item: full timezone names  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Hi,

I propose the appended patch for the Todo item:

        o Allow timezone names in SQL strings, '2006-05-24 21:11
          Americas/New_York'::timestamptz

I changed the ParseDateTime function as well as DecodeDateTime to support
those timezones in timestamps and DecodeTimeOnly to support it in the
timetz type.

'2006-05-24 21:11 America/New_York'::timestamptz is now the same as
'2006-05-24 21:11'::timestamptz at time zone 'America/New_York'

With a timetz it's more tricky, because "America/New_York" does not specify
a timezone offset by itself, this could change due to daylight savings time
for example. So my idea was to apply whatever offset is valid in this region
at the moment of parsing the string representation.

It passes all existing regression tests, I will supply additional regression
tests as well as documentation patches as soon as you have told me that I'm
on the right track :-)


Joachim

Attachment

pgsql-patches by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling
Next
From: Robert Treat
Date:
Subject: Re: [PATCH] Magic block for modules