Re: Timestamp to time_t

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Timestamp to time_t
Дата
Msg-id 57856C2B-4524-4FB2-9D1B-B06A4E8A0666@kineticode.com
обсуждение исходный текст
Ответ на Re: Timestamp to time_t  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список 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 по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: WIP: generalized index constraints
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [BUGS] BUG #5053: domain constraints still leak