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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
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 18:35:03
Message-ID: CAFj8pRB2J-ehtY3duTokzOYPXayH_P48KGbLvJTZJ92-AGf9ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-08-28 20:26 GMT+02:00 Kevin Grittner <kgrittn(at)ymail(dot)com>:

> 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.
>

Yes, it strange for first moment, and it is difficult for beginners - but
it works well .. after you switch to different mode.

But can we implement a Time Zone as special type? This and examples and
documentation can better explain what it does.

Pavel

>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-08-28 18:40:52 Re: Similar to csvlog but not really, json logs?
Previous Message Kevin Grittner 2014-08-28 18:26:53 Re: Why data of timestamptz does not store value of timezone passed to it?