[PATCH] indexability of << operator for inet/cidr - Mailing list pgsql-hackers

From Alex Pilosov
Subject [PATCH] indexability of << operator for inet/cidr
Date
Msg-id Pine.BSO.4.10.10106141626270.17809-200000@spider.pilosoft.com
Whole thread Raw
Responses Re: [PATCH] indexability of << operator for inet/cidr
Re: [PATCH] indexability of << operator for inet/cidr
Re: [PATCH] indexability of << operator for inet/cidr
List pgsql-hackers
Attached is a patch that explains to optimizer that its possible to use
index when performing a << b where a is an inet/cidr value and b is a
constant.

Indexpath generated for such an expression is this:
(a > network(b)) and (a <= set_masklen(broadcast(b, 32)))

Since this is my first time delving in the guts of postgres, someone
definitely should review it :)

I mostly based my code on prefix_quals function for string types.

Thanks


pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: Update on Access 97 and = NULL
Next
From: Peter Eisentraut
Date:
Subject: Re: Doing authentication in backend