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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Steve Crawford <scrawford(at)pinpointresearch(dot)com>, rohtodeveloper <rohtodeveloper(at)outlook(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why data of timestamptz does not store value of timezone passed to it?
Date: 2014-08-28 19:33:56
Message-ID: 20140828193356.GN14956@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 28, 2014 at 11:26:53AM -0700, Kevin Grittner wrote:
> Steve Crawford <scrawford(at)pinpointresearch(dot)com> wrote:
>
> > I have always considered "timestamp with time zone" to be a bad
> > description of that data type but it appears to be a carryover
> > from the specs. It is really a "point in time"
>
> I agree.  While what timestamptz implements is a very useful data
> type, I think it was a very unfortunate decision to implement that
> for the standard type name, instead of something more consistent
> with the spec.  It seems very unlikely to change, though, because
> so much existing production code would break.  :-(
>
> Understandably, people do tend to expect that saving something into
> a column defined as TIMESTAMP WITH TIME ZONE will save a time zone
> with the timestamp, and in PostgreSQL it does not.

So the standard requires storing of original timezone in the data type?
I was not aware of that.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-08-28 19:34:15 Re: pgsql: Allow units to be specified in relation option setting value.
Previous Message Robert Haas 2014-08-28 19:33:11 Re: Per table autovacuum vacuum cost limit behaviour strange