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 <[email protected]> Reviewed-by: Paul A Jungwirth <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/CACJufxGoAmN_0iJ=hjtg0vgposoyy-vyyfe+-q0awxrq2_p...@mail.gmail.com Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4edd6036d69ce42ac1af236f659f20daed65c8d4 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(-)
