Re: Why data of timestamptz does not store value of timezone passed to it? - Mailing list pgsql-hackers

From Gianni Ciolli
Subject Re: Why data of timestamptz does not store value of timezone passed to it?
Date
Msg-id 20140829215901.GA20293@756b4.gi.lan
Whole thread Raw
In response to Re: Why data of timestamptz does not store value of timezone passed to it?  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Hi Craig,

On Fri, Aug 29, 2014 at 10:17:17AM +0800, Craig Ringer wrote:
> (...) It should also discuss the approach of storing a (instant
> timestamptz, timezone text) or (instant timestampts, tzoffset
> smallint) tuple for when unambiguous representation is required.
> 
> (I guess I just volunteered myself to write a draft of that).

Please notice that smallint is too small for tzoffset:
 SELECT d AT TIME ZONE 'Europe/Berlin'      - d AT TIME ZONE 'Europe/Paris' FROM (   VALUES     (date '1815-10-31')   ,
(date'1897-02-19') ) AS f(d);
 

Cheers,
Dr. Gianni Ciolli - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gianni.ciolli@2ndquadrant.it | www.2ndquadrant.it



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: delta relations in AFTER triggers
Next
From: Andres Freund
Date:
Subject: Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins