|From:||Martijn van Oosterhout <kleptog(at)svana(dot)org>|
|Subject:||Re: Comment on timezone and interval types|
|Views:||Raw Message | Whole Thread | Download mbox|
On Sat, Oct 23, 2004 at 06:49:15PM -0500, Bruno Wolff III wrote:
> Recently there has been some discussion about attaching a timezone to
> a timestamp and some other discussion about including a 'day' part
> in the interval type. These two features impact each other, since
> if you add a 'day' to a timestamp the result can depend on what timezone
> the timestamp is supposed to be in. It probably makes more sense to use
> a timezone associated with the timestamp than say the timezone GUC or the
> fixed timezone UTC.
I agree. One issue I can think of is that if you store each timestamp
as a (seconds,timezone) pair, the storage requirements will balloon,
since timezone can be something like "Australia/Sydney" and this will
be repeated for every value in the table. I don't know how to deal
easily with this since there is no unique identifier to timezones and
no implicit order.
The only solution I can think of is have initdb create a pg_timezones
table which assigns an OID to each timezone it finds. Then the type can
I think this is a good solution actually, any thoughts?
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
|Next Message||Tom Lane||2004-10-24 14:43:14||Re: PostgreSQL Security Release(s) for 7.2, 7.3 and 7.4|
|Previous Message||Sim Zacks||2004-10-24 10:40:53||Re: sequence behavior - is this correct|