Open darora opened 2 months ago
this does not seem to be enforced at creation time
I tried
create table abc (
id int primary key,
x timestamp generated always as ( now() ) stored
);
on 15.1 and 16.2 and got a
ERROR: 42P17: generation expression is not immutable
in both cases
@darora do you have a reproducible way to get into the bad state that I can use for testing?
Generated columns in Postgres are required to only use immutable functions, but this does not seem to be enforced at creation time. It can, however, cause the upgrade process to fail.