From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | 德哥 <digoal(at)126(dot)com> |
Cc: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17036: generated column cann't modifyed auto when update |
Date: | 2021-05-27 03:16:10 |
Message-ID: | CAKFQuwbDwpPyf=q-LPUfhiLYHhM_2X_86vXL=tQ0vESivtcN7g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wednesday, May 26, 2021, 德哥 <digoal(at)126(dot)com> wrote:
>
> The generated column can be used to automatically generate the modified
> timestamp of a tuple, but PG 12 currently supports this scenario. PG 13 has
> started to change its behavior, which makes our application need to be
> modified. This is the first time I have ever seen a PG upgrade kill a nice
> feature.
>
>
>
It was never a feature in the first place so nothing has been killed. The
documentation says the function must be immutable. Your function is not.
You should have used a trigger, and the fact you had to write a wrapper
function to hack the volatility means that, frankly, its your disregard for
a known limitation that has produced this need to change your application
with the release of a new major version - not any bug or decision on the
part of PostgreSQL.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-05-27 03:22:42 | Re: BUG #17035: assert after commit |
Previous Message | Tom Lane | 2021-05-27 03:09:00 | Re: BUG #17036: generated column cann't modifyed auto when update |