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: ATPrepAddPrimaryKey: ignore non-PK constraints
Date: Fri, 01 Sep 2023 12:23:39 +0000
Message-ID: <E1qc3Ba-001xb3-Nx@gemulon.postgresql.org> (raw)

ATPrepAddPrimaryKey: ignore non-PK constraints

Because of lack of test coverage, this function added by b0e96f311985
wasn't ignoring constraint types other than primary keys, which it
should have.  Add some lines to a test for it.

Reported-by: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs48bc-k_-1fh0dZpAhp_LiR5MfEX9haystmoBboR_4czCQ@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/tablecmds.c      | 12 +++++++++---
src/test/regress/expected/inherit.out | 25 ++++++++++++++++++++++++-
src/test/regress/sql/inherit.sql      | 15 ++++++++++++++-
3 files changed, 47 insertions(+), 5 deletions(-)



Message-ID: <E1qc3Ba-001xb3-Nx@gemulon.postgresql.org>
Permalink:  ../E1qc3Ba-001xb3-Nx@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qc3Ba-001xb3-Nx@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: ATPrepAddPrimaryKey: ignore non-PK constraints
  In-Reply-To: <E1qc3Ba-001xb3-Nx@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