pgsql: Fix alter_table.sql test case to test what it claims to. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix alter_table.sql test case to test what it claims to.
Date
Msg-id E1otFyT-000X2d-0O@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3383cf023484d595cc58ff47a9aa76ce5ed5bcf3

Modified Files
--------------
src/test/regress/expected/alter_table.out | 30 ++++++++++++++++++++++--------
src/test/regress/sql/alter_table.sql      | 11 +++++++----
2 files changed, 29 insertions(+), 12 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Re-allow building on Microsoft Visual Studio 2013.
Next
From: Tom Lane
Date:
Subject: pgsql: Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT".