pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prevent creation of duplicate not-null constraints for domains
Date: Thu, 03 Jul 2025 09:47:00 +0000
Message-ID: <E1uXGWy-004Uq6-00@gemulon.postgresql.org> (raw)

Prevent creation of duplicate not-null constraints for domains

This was previously harmless, but now that we create pg_constraint rows
for those, duplicates are not welcome anymore.

Backpatch to 18.

Co-authored-by: jian he <jian.universality@gmail.com>
Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CACJufxFSC0mcQ82bSk58sO-WJY4P-o4N6RD2M0D=DD_u_6EzdQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/647cffd2f3210818f3882a1ea40cfbe0a4ea8fd7

Modified Files
--------------
src/backend/commands/typecmds.c      | 14 +++++++++++---
src/test/regress/expected/domain.out |  5 +++++
src/test/regress/sql/domain.sql      |  3 +++
3 files changed, 19 insertions(+), 3 deletions(-)



view thread (2+ messages)

Message-ID: <E1uXGWy-004Uq6-00@gemulon.postgresql.org>
Permalink:  ../E1uXGWy-004Uq6-00@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uXGWy-004Uq6-00@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@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Prevent creation of duplicate not-null constraints for domains
  In-Reply-To: <E1uXGWy-004Uq6-00@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