Re: Timezones (in 8.5?) - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Timezones (in 8.5?)
Date
Msg-id 87my2jcgvi.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Timezones (in 8.5?)  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Timezones (in 8.5?)
Re: Timezones (in 8.5?)
List pgsql-hackers
>>>>> "Kevin" == "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> If he meant (A), then you store the event as:>> (ts,tz) = (timestamp '2010-07-27 10:30:00',>> 'Chile/Santiago')>> If
hemeant (B), then you store the event as>> (tsz,tz) = (timestamp '2010-07-27 10:30:00' at time zone>> 'Chile/Santiago',
'Chile/Santiago')Kevin>You seem to be agreeing that these problems can't be solvedKevin> without storing a time zone
stringin addition to theKevin> timestamp.  As I read it, Hernán was wishing for types whichKevin> include this, rather
thanhaving to do the above dance withKevin> multiple values. 

Right, but including more data in a single type is the wrong approach,
since it complicates the semantics and interferes with normalization.
For example, if you have a type T which incorporates a timestamp and a
timezone, what semantics does the T = T operator have? What semantics
apply if the definitions of timezones change? What if you're storing
times of events at specific places; in that case you want to associate
the timezone with the _place_ not the event (so that if the timezone
rules change, moving the place from one timezone to another, you only
have to change the place, not all the events that refer to it).

--
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Listen / Notify - what to do when the queue is full
Next
From: Sushant Sinha
Date:
Subject: Re: Very bad FTS performance with the Polish config