agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix WITHOUT OVERLAPS' interaction with domains.
Date: Tue, 07 Apr 2026 18:45:55 +0000
Message-ID: <E1wABQx-003ROY-0H@gemulon.postgresql.org> (raw)
Fix WITHOUT OVERLAPS' interaction with domains.
UNIQUE/PRIMARY KEY ... WITHOUT OVERLAPS requires the no-overlap
column to be a range or multirange, but it should allow a domain
over such a type too. This requires minor adjustments in both
the parser and executor.
In passing, fix a nearby break-instead-of-continue thinko in
transformIndexConstraint. This had the effect of disabling
parse-time validation of the no-overlap column's type in the context
of ALTER TABLE ADD CONSTRAINT, if it follows a dropped column.
We'd still complain appropriately at runtime though.
Author: Jian He <jian.universality@gmail.com>
Reviewed-by: Paul A Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CACJufxGoAmN_0iJ=hjTG0vGpOSOyy-vYyfE+-q0AWxrq2_p5XQ@mail.gmail.com
Backpatch-through: 18
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/49f3cb453b9b86b771b0a15393893fb317e35572
Modified Files
--------------
src/backend/executor/execIndexing.c | 12 ++++++--
src/backend/parser/parse_utilcmd.c | 17 +++++++----
src/test/regress/expected/without_overlaps.out | 39 ++++++++++++++++++++++++++
src/test/regress/sql/without_overlaps.sql | 31 ++++++++++++++++++++
4 files changed, 91 insertions(+), 8 deletions(-)
view thread (2+ messages) latest in thread
Message-ID: <E1wABQx-003ROY-0H@gemulon.postgresql.org>
Permalink: ../E1wABQx-003ROY-0H@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wABQx-003ROY-0H@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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix WITHOUT OVERLAPS' interaction with domains.
In-Reply-To: <E1wABQx-003ROY-0H@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox