Re: Timestamp to time_t - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Timestamp to time_t
Date
Msg-id 57856C2B-4524-4FB2-9D1B-B06A4E8A0666@kineticode.com
Whole thread Raw
In response to Re: Timestamp to time_t  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
On Sep 15, 2009, at 11:01 AM, Andrew Gierth wrote:

> If you want to store both a timestamp and an associated timezone you  
> can do
> it right now, using a composite type or two columns, with the  
> advantage that
> you get semantics that you can rely on.

How would a composite work in practice? Can you index it on the  
timestamp? Or would you have to use two columns for that?

I could see a real advantage to a type that stored the TZ with which  
it was created, with the ability to fetch it back out. Internally the  
data could be stored just like it is with timestamptz, and by default,  
perhaps, it would display in $PGTZ, but if $PGTZ was set to a value  
like "original" or something, it should display the originals. Now  
*that* would be really useful IMHO.

Best,

David


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: WIP: generalized index constraints
Next
From: "Kevin Grittner"
Date:
Subject: Re: [BUGS] BUG #5053: domain constraints still leak