Request for removal of BUG #5705 from todo items as no repro

From: Ankit Kumar Pandey <itsankitkp(at)gmail(dot)com>
To: pghackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Request for removal of BUG #5705 from todo items as no repro
Date: 2022-12-31 08:32:03
Message-ID: b2eeb8d5-05fb-9083-d59d-dc09d0881bc1@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

This is in reference to BUG #5705 and corresponding todo item: Fix
/contrib/btree_gist's implementation of inet indexing

Issue: SELECT '1.255.255.200/8'::inet < '1.0.0.0'::inet didn't worked
with index.

I am not able to repro this issue.

Steps:

SELECT '1.255.255.200/8'::inet < '1.0.0.0'::inet;
 ?column?
----------
 t
(1 row)

CREATE TABLE inet_test (a inet);
INSERT INTO inet_test VALUES ('1.255.255.200/8');

SELECT * FROM inet_test WHERE a < '1.0.0.0'::inet;
        a
-----------------
 1.255.255.200/8
(1 row)

EXPLAIN ANALYZE SELECT * FROM inet_test WHERE a < '1.0.0.0'::inet;
                                             QUERY PLAN
----------------------------------------------------------------------------------------------------
 Seq Scan on inet_test  (cost=0.00..1.01 rows=1 width=32) (actual
time=0.032..0.033 rows=1 loops=1)
   Filter: (a < '1.0.0.0'::inet)
 Planning Time: 0.040 ms
 Execution Time: 0.049 ms
(4 rows)

UPDATE pg_opclass SET opcdefault=true WHERE opcname = 'inet_ops';

CREATE INDEX inet_test_idx ON inet_test USING gist (a);
SET enable_seqscan = false;

SELECT * FROM inet_test WHERE a < '1.0.0.0'::inet;
        a
-----------------
 1.255.255.200/8

## This was expected to return 0 rows as in bug report

EXPLAIN analyze SELECT * FROM inet_test WHERE a < '1.0.0.0'::inet;
                                                          QUERY PLAN

--------------------------------------------------------------------------------------------------------------------------
-----
 Index Only Scan using inet_test_idx on inet_test (cost=0.12..8.14
rows=1 width=32) (actual time=0.024..0.025 rows=1 loop
s=1)
   Index Cond: (a < '1.0.0.0'::inet)
   Heap Fetches: 1
 Planning Time: 0.056 ms
 Execution Time: 0.044 ms
(5 rows)

Gist index works fine as opposed to issue reported in the bug. Bug
should be marked as resolved and todo item can be removed.

--
Regards,
Ankit Kumar Pandey

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-12-31 13:48:15 Re: split TOAST support out of postgres.h
Previous Message Noah Misch 2022-12-31 06:16:40 Re: allowing for control over SET ROLE