Fix alter_table.sql test case to test what it claims to.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b158e0b1b1bfd2dfce6d66d67dba3c94449f9cac
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-11-10T22:24:26Z
Releases: 16.0
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.

Files