RE: Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable? - Mailing list pgsql-hackers

From Floris Van Nee
Subject RE: Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?
Date
Msg-id 8a361ddf99ef46fd8b84f1fda0731e9e@opammb0562.comp.optiver.com
Whole thread Raw
In response to Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?  (Alexander Pyhalov <a.pyhalov@postgrespro.ru>)
List 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)




pgsql-hackers by date:

Previous
From: Alexander Pyhalov
Date:
Subject: Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?
Next
From: Daniel Gustafsson
Date:
Subject: Re: Slightly improve initdb --sync-only option's help message