Re: BUG #19000: gist index returns inconsistent result with gist_inet_ops

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: BUG #19000: gist index returns inconsistent result with gist_inet_ops
Date: 2025-07-28 02:23:13
Message-ID: CAMbWs49vGc45oQ98bhx4dFpXOsimUX9TTnXOXG=i6+X6sAqBRw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jul 28, 2025 at 5:16 AM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> CREATE EXTENSION btree_gist;
>
> CREATE TABLE t AS SELECT '192.168.1.0/25'::inet AS i;
>
> SELECT * FROM t WHERE i << '192.168.1.0/24'::cidr;
> i
> ----------------
> 192.168.1.0/25
>
> CREATE INDEX ON t USING gist(i);
>
> SELECT * FROM t WHERE i << '192.168.1.0/24'::cidr;
> i
> ---
> (0 rows)

It seems that with gist_inet_ops the index's opfamily does not support
the '<<' operator correctly.

With inet_ops, the query works correctly.

CC'ing Peter to have a look.

Thanks
Richard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message shveta malik 2025-07-28 04:48:02 Re: Unexpected Standby Shutdown on sync_replication_slots change
Previous Message Tom Lane 2025-07-27 22:29:58 Re: Lower priority of the configure option --with-libraries causes wrong lib resolution