From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Ilya Kosmodemiansky <ik(at)dataegret(dot)com> |
Cc: | "Wetmore, Matthew (CTR)" <Matthew(dot)Wetmore(at)express-scripts(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: GENERATE AS |
Date: | 2023-06-22 20:25:34 |
Message-ID: | CAKFQuwbJcON2=Ky9rDNJdUGa8iuu6nYnPnRa_jr85iRkCokKww@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, Jun 22, 2023 at 1:13 PM Ilya Kosmodemiansky <ik(at)dataegret(dot)com>
wrote:
> Timestamp with time zone as an argument makes function not immutable
> because timezone could be set locally and results could differ depending
> on timezone
>
>
The problem here is not timezone related - it is more fundamental in that
the stored data does not change but the expression, as time progresses, is
going to give different values and thus make what is stored incorrect.
You should not store data that changes simply due to the passage of time
(i.e., relies on external-to-the-record information).
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2023-06-22 20:45:15 | Re: GENERATE AS |
Previous Message | Ilya Kosmodemiansky | 2023-06-22 20:13:28 | Re: GENERATE AS |