Re: GENERATE AS - Mailing list pgsql-admin

From David G. Johnston
Subject Re: GENERATE AS
Date
Msg-id CAKFQuwbJcON2=Ky9rDNJdUGa8iuu6nYnPnRa_jr85iRkCokKww@mail.gmail.com
Whole thread Raw
In response to Re: GENERATE AS  (Ilya Kosmodemiansky <ik@dataegret.com>)
Responses Re: GENERATE AS
List pgsql-admin
On Thu, Jun 22, 2023 at 1:13 PM Ilya Kosmodemiansky <ik@dataegret.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.

pgsql-admin by date:

Previous
From: Ilya Kosmodemiansky
Date:
Subject: Re: GENERATE AS
Next
From: Ron
Date:
Subject: Re: GENERATE AS