[PATCH] indexability of << operator for inet/cidr

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [PATCH] indexability of << operator for inet/cidr
Date: 2001-06-14 20:30:14
Message-ID: Pine.BSO.4.10.10106141626270.17809-200000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Attachment Content-Type Size
pg-index-inetsub.patch text/plain 7.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-06-14 20:34:08 Re: Doing authentication in backend
Previous Message Tom Lane 2001-06-14 20:27:14 Re: What (not) to do in signal handlers