Re: BUG #5705: btree_gist: Index on inet changes query result - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #5705: btree_gist: Index on inet changes query result
Date
Msg-id AANLkTin4Qt4XVF8s1UxHP36guTDHdSUPmCFukF0Oimw4@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5705: btree_gist: Index on inet changes query result  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5705: btree_gist: Index on inet changes query result  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Oct 11, 2010 at 7:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Andreas Karlsson" <andreas@proxel.se> writes:
>> I was looking at the code to see how one would improve indexing of the i=
net
>> types and saw an inconsistency between the compressed format
>> (gbt_inet_compress) and how network_cmp_internal works. The btree_gist
>> module ignores the netmask.
>
> Well, actually the btree_gist implementation for inet is a completely
> broken piece of junk: it thinks that convert_network_to_scalar is 100%
> trustworthy and can be used as a substitute for the real comparison
> functions, which isn't even approximately true. =A0I'm not sure why
> Teodor implemented it like that instead of using the type's real
> comparison functions, but it's pretty much useless if you want the
> same sort order that the type itself defines.

Are you planning to fix this?

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Recovery bug
Next
From: Tom Lane
Date:
Subject: Re: BUG #5705: btree_gist: Index on inet changes query result