pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove ATT_TABLE for ALTER TABLE ... ATTACH/DETACH
Date: Tue, 24 Sep 2024 00:01:06 +0000
Message-ID: <E1ssszJ-000bZ1-Ql@gemulon.postgresql.org> (raw)

Remove ATT_TABLE for ALTER TABLE ... ATTACH/DETACH

Attempting these commands for a non-partitioned table would result in a
failure when creating the relation in transformPartitionCmd().  This
gives the possibility to throw an error earlier with a much better error
message, thanks to d69a3f4d70b7.

The extra test cases are from me.  Note that FINALIZE uses a different
subcommand and it had no coverage for its failure path with
non-partitioned tables.

Author: Álvaro Herrera, Michael Paquier
Reviewed-by: Nathan Bossart
Discussion: https://postgr.es/m/202409190803.tnis52adt2n5@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bbba59e69a56e1622e270f5e47b402c3a904cefc

Modified Files
--------------
src/backend/commands/tablecmds.c          |  8 +++-----
src/test/regress/expected/alter_table.out | 12 ++++++++++--
src/test/regress/sql/alter_table.sql      |  2 ++
3 files changed, 15 insertions(+), 7 deletions(-)



Message-ID: <E1ssszJ-000bZ1-Ql@gemulon.postgresql.org>
Permalink:  ../E1ssszJ-000bZ1-Ql@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ssszJ-000bZ1-Ql@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove ATT_TABLE for ALTER TABLE ... ATTACH/DETACH
  In-Reply-To: <E1ssszJ-000bZ1-Ql@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