pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix alter_table.sql test case to test what it claims to.
Date: Thu, 10 Nov 2022 22:24:41 +0000
Message-ID: <E1otFyT-000X2d-0O@gemulon.postgresql.org> (raw)

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(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1otFyT-000X2d-0O@gemulon.postgresql.org>
Permalink:  ../E1otFyT-000X2d-0O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1otFyT-000X2d-0O@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix alter_table.sql test case to test what it claims to.
  In-Reply-To: <E1otFyT-000X2d-0O@gemulon.postgresql.org>
  References: <E1otFyT-000X2d-0O@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox