Re: Clarifying "timestamp with time zone"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Clarifying "timestamp with time zone"
Date: 2018-06-15 19:43:14
Message-ID: 315.1529091794@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeremy Finzel <finzelj(at)gmail(dot)com> writes:
> We often prefer to use timestamptz or "timestamp with time zone" in our
> environment because of its actually storing "objective time" with respect
> to UTC. But in my own work experience, I have scarcely encountered a case
> where business users, and software engineers, do not actually think it
> means the opposite.

Yeah, it's confusing :-(.

> I do believe this is part of the SQL standard,

Actually not, or at least the standard thinks the type should behave
differently from this. They think it should store a local timestamp and
then separately a GMT offset. The way it works in PG was dreamed up ~20
years ago by Tom Lockhart, and in retrospect it was not a great idea
for him to have used the SQL-standard type name for something with
not-SQL-standard behavior.

However, at this point, it's not clear how we could change it without
causing truly enormous backwards-compatibility pain. If it were a
fringe-usage type, maybe we could get away with a renaming, but it's
certainly not that.

> So it seems to me that "timestamp with time zone" is a misnomer in a big
> way, and perhaps it's worth at least clarifying the docs about this,

Don't the docs describe the behavior pretty clearly already?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-06-15 19:57:49 Re: Clarifying "timestamp with time zone"
Previous Message David G. Johnston 2018-06-15 19:36:10 Re: Clarifying "timestamp with time zone"