]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix alter_table.sql test case to test what it claims to.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2022 22:24:26 +0000 (17:24 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2022 22:24:26 +0000 (17:24 -0500)
commit6a1396fd19a3cefc71e176931c9e02a3b12d32eb
tree618ab9d4284ff6e5d11ae88f37bd5c7c8c32b552
parentcf0f465c0d47769b65ed266a49c815ffe4d865cc
Fix alter_table.sql test case to test what it claims to.

The stanza "SET STORAGE may need to add a TOAST table" does not
test what it's supposed to, and hasn't done so since we added
the ability to store constant column default values as metadata.
We need to use a non-constant default to get the expected table
rewrite to actually happen.

Fix that, and add the missing checks that would have exposed the
problem to begin with.

Noted while reviewing a patch that made changes in this test case.
Back-patch to v11 where the problem came in.
src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql