Re: storing TZ along timestamps

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: storing TZ along timestamps
Date: 2011-06-02 18:37:45
Message-ID: 1307039865.11647.12.camel@jdavis-ux.asterdata.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2011-05-27 at 16:43 -0400, Alvaro Herrera wrote:
> One of our customers is interested in being able to store original
> timezone along with a certain timestamp.

Another thing to consider is that this will eliminate any useful total
order.

You could define an arbitrary total order, of course, just to allow
BTrees for equality searches. However, I don't think you should define
">" (and other non-equality comparator operators) according to that
total order -- they should be more hidden like "~>~". ">" should not
exist as an operator over this type at all.

I also do not like the idea of having "=" mean "equivalent after
timezone adjustment". If we're making a distinction between "2000-01-01
10:00:00 +03" and "2000-01-01 9:00:00 +02", then "=" should not obscure
that distinction.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2011-06-02 18:43:15 Re: patch review : Add ability to constrain backend temporary file space
Previous Message Merlin Moncure 2011-06-02 18:36:22 Re: storing TZ along timestamps