Re: [PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION - Mailing list pgsql-hackers

From solai v
Subject Re: [PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION
Date
Msg-id CAF0whufxMsRLvoGAsxAouboBj_31P07f0Etexgwh7d6fnyOu_w@mail.gmail.com
Whole thread
List pgsql-hackers
Hi
I tested v5-0001-recreate-wholerow-dependent-while-ALTER-COLUMN-SET-EXPRESSION.patch
on the current master.The patch applied cleanly and PostgreSQL built
successfully.
I was able to reproduce the issue on unpatched master using a
whole-row CHECK constraint referencing the generated column
through:CHECK ((gtest).b IS NOT NULL).
Without the patch,ALTER COLUMN SET EXPRESSION succeeded even though
existing rows no longer satisfied the constraint.
After applying the patch ,the same ALTER TABLE command correctly
failed with : ERROR:check constraint "whole_row_check" of relation
"gtest" is violated by some row.
The fix and regression coverage look good to me.

Regards,
Solai



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Should IGNORE NULLS cache nullness for volatile arguments?
Next
From: vellaipandiyan sm
Date:
Subject: Review observations for partial REFRESH MATERIALIZED VIEW patc