pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't disallow DROP of constraints ONLY on partitioned tables
Date: Mon, 30 Sep 2024 09:59:36 +0000
Message-ID: <E1svDBn-001YNU-Mc@gemulon.postgresql.org> (raw)

Don't disallow DROP of constraints ONLY on partitioned tables

This restriction seems to have come about due to some fuzzy thinking: in
commit 9139aa19423b we were adding a restriction against ADD constraint
ONLY on partitioned tables (which is sensible) and apparently we thought
the DROP case had to be symmetrical.  However, it isn't, and the
comments about it are mistaken about the effect it would have.  Remove
this limitation.

There have been no reports of users bothered by this limitation, so I'm
not backpatching it just yet.  We can revisit this decision later, as needed.

Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Discussion: https://postgr.es/m/202409261752.nbvlawkxsttf@alvherre.pgsql
Discussion: https://postgr.es/m/7682253a-6f79-6a92-00aa-267c4c412870@lab.ntt.co.jp
        (about commit 9139aa19423b, previously not registered)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4dea33ce765d65d8807d343ca6535a3d067a63da

Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml         |  4 +++-
src/backend/commands/tablecmds.c          | 38 +------------------------------
src/test/regress/expected/alter_table.out | 21 +++++++++++------
src/test/regress/sql/alter_table.sql      |  7 +++---
4 files changed, 22 insertions(+), 48 deletions(-)



Message-ID: <E1svDBn-001YNU-Mc@gemulon.postgresql.org>
Permalink:  ../E1svDBn-001YNU-Mc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1svDBn-001YNU-Mc@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: alvherre@alvh.no-ip.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Don't disallow DROP of constraints ONLY on partitioned tables
  In-Reply-To: <E1svDBn-001YNU-Mc@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