Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vE882-005w9T-3M for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2025 15:30:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vE880-001qiB-S5 for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2025 15:30:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vE880-001qi3-Jm for pgsql-bugs@lists.postgresql.org; Wed, 29 Oct 2025 15:30:23 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vE87y-004PFP-0D for pgsql-bugs@lists.postgresql.org; Wed, 29 Oct 2025 15:30:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 59TFUD3e2750967; Wed, 29 Oct 2025 11:30:13 -0400 From: Tom Lane To: Laurenz Albe cc: n.bartek3762@gmail.com, pgsql-bugs@lists.postgresql.org, "Paul A. Jungwirth" , Peter Eisentraut Subject: Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that In-reply-to: <2748212.1761750444@sss.pgh.pa.us> References: <19098-7f8deb5093c13da2@postgresql.org> <11e73b0d2d89476fb04e6055a80638f776bb6f18.camel@cybertec.at> <2748212.1761750444@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 29 Oct 2025 11:07:24 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2750965.1761751813.1@sss.pgh.pa.us> Date: Wed, 29 Oct 2025 11:30:13 -0400 Message-ID: <2750966.1761751813@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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