RE: Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?

From: Floris Van Nee <florisvannee(at)Optiver(dot)com>
To: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?
Date: 2021-08-16 11:25:49
Message-ID: 8a361ddf99ef46fd8b84f1fda0731e9e@opammb0562.comp.optiver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> What do I miss?
>
> --
> Best regards,
> Alexander Pyhalov,
> Postgres Professional
>

See for example around DST changes

postgres=# begin;
BEGIN
postgres =# show timezone;
TimeZone
------------------
Europe/Amsterdam
(1 row)

postgres=# select '2021-03-27 15:00 +0100'::timestamptz + interval '1d';
?column?
------------------------
2021-03-28 15:00:00+02
(1 row)

postgres =# set timezone to UTC;
SET
postgres =# select '2021-03-27 15:00 +0100'::timestamptz + interval '1d';
?column?
------------------------
2021-03-28 14:00:00+00
(1 row)

postgres =# select '2021-03-28 15:00:00+02' = '2021-03-28 14:00:00+00';
?column?
----------
f
(1 row)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-08-16 11:42:01 Re: Slightly improve initdb --sync-only option's help message
Previous Message Alexander Pyhalov 2021-08-16 10:29:45 Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?