Re: Default to TIMESTAMP WITH TIME ZONE?

From: David Fetter <david(at)fetter(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Default to TIMESTAMP WITH TIME ZONE?
Date: 2021-08-16 00:51:56
Message-ID: 20210816005155.GY18391@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 14, 2021 at 10:03:01AM +0200, Peter Eisentraut wrote:
> On 13.08.21 19:07, Tom Lane wrote:
> > "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > > On Fri, Aug 13, 2021 at 9:28 AM Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
> > > wrote:
> > > > The only hope is to eventually change the default, so probably
> > > > the best thing is to apply pressure via the SQL Std process.
> >
> > > Then there is no hope because this makes the situation worse.
> >
> > Agreed; the points I made upthread are just as valid if the change
> > is made in the standard. But I'd be astonished if the SQL
> > committee would consider such a change anyway.
>
> AFAIU, our timestamp with time zone type doesn't really do what the
> SQL standard specifies anyway, as it doesn't actually record the
> time zone, but it's more of a "timestamp with time zone aware
> formatting". For SQL, it might make sense to add a (third) time
> stamp type that behaves more like that.

The way the standard defines time zones, namely as fix offsets from
UTC, is just ludicrous and has been baseless in fact much longer than
SQL has existed. If we're going to capture input time zones, we
should come up with a way to capture the time zone as it existed when
the write occurred, i.e. both its name and the UTC offset it
represented at that time of the write.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-08-16 01:31:01 Re: PoC/WIP: Extended statistics on expressions
Previous Message Tom Lane 2021-08-15 21:47:43 Minor regexp hacking: code coverage, moveins() and friends