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

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

From
Ankit Kumar Pandey
Date:
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




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

From
Tom Lane
Date:
Ankit Kumar Pandey <itsankitkp@gmail.com> writes:
> This is in reference to BUG #5705 and corresponding todo item: Fix
> /contrib/btree_gist's implementation of inet indexing

> I am not able to repro this issue.

You didn't test it right: the complaint is about the btree_gist
extension, not the in-core inet opclass, which didn't even
exist when this bug was filed.  AFAICS btree_gist is still
broken.  See

https://www.postgresql.org/message-id/flat/201010112055.o9BKtZf7011251%40wwwmaster.postgresql.org

The commit message for f23a5630e may also be informative:

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=f23a5630e

            regards, tom lane



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

From
Ankit Kumar Pandey
Date:
On 31/12/22 23:32, Tom Lane wrote:
> Ankit Kumar Pandey <itsankitkp@gmail.com> writes:
>> This is in reference to BUG #5705 and corresponding todo item: Fix
>> /contrib/btree_gist's implementation of inet indexing
>> I am not able to repro this issue.
> You didn't test it right: the complaint is about the btree_gist
> extension, not the in-core inet opclass, which didn't even
> exist when this bug was filed.  AFAICS btree_gist is still
> broken.  See
>
> https://www.postgresql.org/message-id/flat/201010112055.o9BKtZf7011251%40wwwmaster.postgresql.org
>
> The commit message for f23a5630e may also be informative:
>
> https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=f23a5630e
>
>             regards, tom lane

Hi,

Sorry I missed this. Thanks for the pointer, I will check this again 
properly.

-- 
Regards,
Ankit Kumar Pandey