Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Comment on timezone and interval types


  • From: Martijn van Oosterhout <kleptog@svana.org>
  • To: pgsql-general@postgresql.org
  • Subject: Re: Comment on timezone and interval types
  • Date: Sun, 24 Oct 2004 13:59:54 +0200
  • Message-id: <20041024115952.GA5188@svana.org>

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
use that.

I think this is a good solution actually, any thoughts?
-- 
Martijn van Oosterhout   <kleptog@svana.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.

Attachment: pgpHilDQScih9.pgp
Description: PGP signature



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group