| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix alter_table.sql test case to test what it claims to. |
| Date: | 2022-11-10 22:24:41 |
| Message-ID: | E1otFyS-000X2Z-V4@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b158e0b1b1bfd2dfce6d66d67dba3c94449f9cac
Modified Files
--------------
src/test/regress/expected/alter_table.out | 32 ++++++++++++++++++++++---------
src/test/regress/sql/alter_table.sql | 11 +++++++----
2 files changed, 30 insertions(+), 13 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2022-11-10 23:20:57 | pgsql: Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT". |
| Previous Message | Tom Lane | 2022-11-10 15:24:00 | pgsql: Re-allow building on Microsoft Visual Studio 2013. |