Re: inet/cidr type comparisons - Mailing list pgsql-hackers

From Alex Pilosov
Subject Re: inet/cidr type comparisons
Date
Msg-id Pine.BSO.4.10.10106111559060.28444-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: inet/cidr type comparisons  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 11 Jun 2001, Tom Lane wrote:

> > It can't be resolved during the planning (directfunctioncall) because I do
> > want queries of a << b (b isn't a constant) to be also using the same
> > mechanism. (so far it looks like special_index_* can cope with that OK)
> 
> You're mistaken ... that's not supported currently.
Augh, you are right. Well, now I have three options

a) fix match_clause_to_indexkey to use something like special_index_* for
'special' operators that can use indices in a nested loop-join. 

b) add another access method to btree and muck with pg_amop (uuugh, bad
idea)

c) decide that I'm way deeper than I wanted to be already, and forget
about the idea.

Where I need a<<=b, I guess I can just use a>=network(b) and
a<next_network(b) directly. 

Tom, thanks for helping me out.

I'll still follow up with set_masklen and network_text funcs.

-alex








pgsql-hackers by date:

Previous
From: Jim Mercer
Date:
Subject: Re: inet/cidr type comparisons
Next
From: reinoud@xs4all.nl (Reinoud van Leeuwen)
Date:
Subject: Re: Postgres Replication