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
