pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul A Jungwirth <pj@illuminatedcomputing.com>
Cc: n.bartek3762@gmail.com, pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter@eisentraut.org>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Subject: Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that
Date: Fri, 31 Oct 2025 09:51:55 +0100
Message-ID: <7c4f344adfc2848e3cfe68b148b3e6c352bae554.camel@cybertec.at> (raw)
In-Reply-To: <3329404.1761849077@sss.pgh.pa.us>
References: <19098-7f8deb5093c13da2@postgresql.org>
	<11e73b0d2d89476fb04e6055a80638f776bb6f18.camel@cybertec.at>
	<2748212.1761750444@sss.pgh.pa.us>
	<2750966.1761751813@sss.pgh.pa.us>
	<CA+renyV3dxf8TSEG7C0vpwwFDr67KF=FGCTZ8ZrXWxOK-T1vfw@mail.gmail.com>
	<0e8907d8a0cb19b64d732ec7b44f8eb669b54075.camel@cybertec.at>
	<CA+renyVFvUeCFeNYqkoQ4Sx+J9Wn+M3wqhtxuWVEpExvJYjsHQ@mail.gmail.com>
	<3329404.1761849077@sss.pgh.pa.us>

On Thu, 2025-10-30 at 14:31 -0400, Tom Lane wrote:
> Paul A Jungwirth <pj@illuminatedcomputing.com> writes:
> > So here is a proposed sequence of work:
> > 
> > - Add an opclass_parameter so you can say without_overlaps = true.
> > Only the last column of the index allows that (at least for now), and
> > there must be an overlaps operator.
> > - If an index has that property, enforce the exclusion constraint
> > rules and forbid empty ranges/multiranges.
> > - Update pg_get_indexdef to output the right syntax to create an
> > independent temporal index.
> 
> > Doing the first 3 items here would fix pg_get_indexdef. The hard one
> > is the second, but I will work on a patch for it. Is that something
> > we'd want to release as a patch to v18?
> 
> I think that's too much risk and churn for v18 at this point.
> Even if we risked putting in such a patch, we'd have a situation
> where pg_get_indexdef in later v18 minor releases would output
> syntax that's rejected by earlier minor releases, which would
> be a mess.
> 
> My feeling is that pg_get_indexdef is broken for these indexes, but
> there's nothing we can do now to improve that in v18.  The important
> thing is to make sure it gets fixed for 19.

One thing we could do is have pg_get_indexdef() throw an error rather
than producing wrong output.

Yours,
Laurenz Albe





view thread (16+ messages)  latest in thread

Message-ID: <7c4f344adfc2848e3cfe68b148b3e6c352bae554.camel@cybertec.at>
Permalink:  ../7c4f344adfc2848e3cfe68b148b3e6c352bae554.camel@cybertec.at/
Also on:    postgresql.org/message-id/7c4f344adfc2848e3cfe68b148b3e6c352bae554.camel@cybertec.at

 · 

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-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, tgl@sss.pgh.pa.us, pj@illuminatedcomputing.com, peter@eisentraut.org, boekewurm+postgres@gmail.com
  Subject: Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that
  In-Reply-To: <7c4f344adfc2848e3cfe68b148b3e6c352bae554.camel@cybertec.at>

* 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