Re: storing TZ along timestamps - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: storing TZ along timestamps
Date
Msg-id 1311029571-sup-2590@alvh.no-ip.org
Whole thread Raw
In response to Re: storing TZ along timestamps  (Josh Berkus <josh@agliodbs.com>)
Responses Re: storing TZ along timestamps
List pgsql-hackers
Excerpts from Josh Berkus's message of lun jul 18 18:37:15 -0400 2011:

> The timestamp and the timezone in which that timestamp was entered are
> two separate pieces of data and *ought* to be in two separate fields.
> For one thing, the question of "what timezone was this entered in" is an
> application-specific question, since you have three different potential
> timezones:
> 
> * the actual client timezone
> * the actual server timezone
> * the application timezone if the application has configurable timezones
> 
> In a builtin data type, which of those three would you pick?  Only the
> application knows.

I think this whole discussion is built on the assumption that the client
timezone and the application timezone are one thing and the same; and
the server timezone is not relevant at all.  If the app TZ is not the
client TZ, then the app will need fixed.

> Additionally, if you have your timestamp-with-original-timezone data
> type, then you're going to need to recode every single
> timestamp-handling function and operator to handle the new type.

I have my doubts about that, and I hope not.  These details haven't been
discussed at all; I only started this thread to get community approval
on cataloguing the TZs.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Next
From: David Fetter
Date:
Subject: Re: proposal: new contrib module plpgsql's embeded sql validator