Re: Why data of timestamptz does not store value of timezone passed to it?

From: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why data of timestamptz does not store value of timezone passed to it?
Date: 2014-08-29 21:59:02
Message-ID: 20140829215901.GA20293@756b4.gi.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)ciolli(at)2ndquadrant(dot)it | www.2ndquadrant.it

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-08-29 22:08:34 Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins
Previous Message Kevin Grittner 2014-08-29 21:15:01 Re: delta relations in AFTER triggers