Re: storing TZ along timestamps

From: Jim Nasby <jim(at)nasby(dot)net>
To: David E(dot) Wheeler <david(at)kineticode(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: storing TZ along timestamps
Date: 2011-07-21 21:39:23
Message-ID: 0D1368A8-B01B-43CC-A8F9-E7591FDE1B43@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 19, 2011, at 4:20 PM, David E. Wheeler wrote:
> On Jul 19, 2011, at 2:06 PM, Josh Berkus wrote:
>
>> I am strongly in favor of having a *timezone* data type and some system
>> whereby we can uniquely identify timezones in the Zic database.
>
> CREATE OR REPLACE FUNCTION is_timezone(
> tz CITEXT
> ) RETURNS BOOLEAN LANGUAGE plpgsql STABLE AS $$
...
> CREATE DOMAIN timezone AS CITEXT CHECK ( is_timezone( VALUE ) );

Storing giant globs of text with every timestamp field is really ugly.
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2011-07-21 21:44:14 Re: storing TZ along timestamps
Previous Message Bruce Momjian 2011-07-21 21:13:18 Re: pg_upgrade and log file output on Windows