From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Karlsson <andreas@proxel.se>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5705: btree_gist: Index on inet changes query result
Date: Mon, 11 Oct 2010 19:50:06 -0400
Message-ID: <8973.1286841006@sss.pgh.pa.us> (raw)
In-Reply-To: <201010112055.o9BKtZf7011251@wwwmaster.postgresql.org>
References: <201010112055.o9BKtZf7011251@wwwmaster.postgresql.org>
"Andreas Karlsson" <andreas@proxel.se> writes:
> I was looking at the code to see how one would improve indexing of the inet
> 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. I'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.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andreas@proxel.se
Subject: Re: BUG #5705: btree_gist: Index on inet changes query result
In-Reply-To: <8973.1286841006@sss.pgh.pa.us>
References: <201010112055.o9BKtZf7011251@wwwmaster.postgresql.org> <8973.1286841006@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox