| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix WITHOUT OVERLAPS' interaction with domains. |
| Date: | 2026-04-07 18:45:55 |
| Message-ID: | E1wABQx-003ROY-0H@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)universality(at)gmail(dot)com>
Reviewed-by: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2026-04-07 20:15:55 | pgsql: Switch EXPLAIN to unaligned output for json/xml/yaml |
| Previous Message | Andres Freund | 2026-04-07 17:59:42 | pgsql: Allow retrieving x86 TSC frequency/flags from CPUID |