From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: n.bartek3762@gmail.com, pgsql-bugs@lists.postgresql.org, "Paul A. Jungwirth" <pj@illuminatedcomputing.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Subject: Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that
Date: Wed, 29 Oct 2025 11:30:13 -0400
Message-ID: <2750966.1761751813@sss.pgh.pa.us> (raw)
In-Reply-To: <2748212.1761750444@sss.pgh.pa.us>
References: <19098-7f8deb5093c13da2@postgresql.org>
<11e73b0d2d89476fb04e6055a80638f776bb6f18.camel@cybertec.at>
<2748212.1761750444@sss.pgh.pa.us>
I wrote:
> I have not looked at the WITHOUT OVERLAPS patch, but if the mechanism
> underlying that is just to set pg_index.indisunique, then it seems
> like a reasonable answer here is to allow this syntax.
On second thought, not really, because it'd preclude ever supporting
"normal" unique indexes with GiST. Really the only thing I can
think of that isn't a complete violation of pg_get_indexdef's contract
to produce a correct representation of the index is for it to emit
an ALTER TABLE ADD CONSTRAINT command to represent these indexes.
Which seems like kind of a mess, not only because it will likely
require a deal of extra code in ruleutils, but because it will likely
break calling applications that aren't expecting such syntax.
I wonder how hard it would be to extend CREATE INDEX so that it
could produce a non-phony representation of such indexes, with the
&&-semantics columns clearly distinguished from the =-semantics ones.
Is including an opclass name sufficient, or is there some additional
secret sauce for the temporal columns?
fc0438b4e could perhaps have spent a bit longer in the oven.
regards, tom lane
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, pj@illuminatedcomputing.com, peter@eisentraut.org
Subject: Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that
In-Reply-To: <2750966.1761751813@sss.pgh.pa.us>
* 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