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

From Tom Lane
Subject Re: Timezones (in 8.5?)
Date
Msg-id 29475.1258474419@sss.pgh.pa.us
Whole thread Raw
In response to Re: Timezones (in 8.5?)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Timezones (in 8.5?)  (hernan gonzalez <hgonzalez@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> One random thought - I am not aware that we currently have a "time
> zone" type in which to store a time zone in.  Is there any value in
> having such a thing vs. just using varchar?

The main potential advantage seems to be faster lookup of the zone's
associated data ... but I think we already keep the data in a hashtable
indexed by hash of the zone name, so the gain might be pretty marginal.

A specialized type *might* provide some notational advantage for writing
operators, eg maybe "timestamp @ zone" would be sensible.  But this is
speculative without some clearer idea of what operations you'd want.
And anyway it's not clear that text wouldn't work just as well there.

Perhaps the OP should explain exactly what real-world problems he's
trying to solve.  As noted in the discussion you linked, there's not
a lot of enthusiasm around here for getting closer to the spec's
datetime handling simply because it's the spec; that part of the spec
is just too broken for that to be a credible argument.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Partitioning option for COPY
Next
From: Emmanuel Cecchet
Date:
Subject: Re: Partitioning option for COPY