| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> | 
|---|---|
| To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>, n(dot)bartek3762(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(at)eisentraut(dot)org>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> | 
| Subject: | Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that | 
| Date: | 2025-10-31 09:11:31 | 
| Message-ID: | CALdSSPh52=2Y2kZ7TZ1zY5qf9im60OjF32pBoBRJFYScgJKGvg@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
On Fri, 31 Oct 2025 at 13:52, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Thu, 2025-10-30 at 14:31 -0400, Tom Lane wrote:
> > Paul A Jungwirth <pj(at)illuminatedcomputing(dot)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
>
Yep, errcode(FEATURE_NOT_SUPPORTED) here may be a lesser evil compared
to others.
-- 
Best regards,
Kirill Reshke
| From | Date | Subject | |
|---|---|---|---|
| Next Message | dengkai | 2025-10-31 09:45:59 | 回复: [bug report] About create table like feature's bug | 
| Previous Message | Laurenz Albe | 2025-10-31 08:51:55 | Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that |