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

From Bruce Momjian
Subject Re: [PATCH] indexability of << operator for inet/cidr
Date
Msg-id 200106151356.f5FDuj322159@candle.pha.pa.us
Whole thread Raw
In response to [PATCH] indexability of << operator for inet/cidr  (Alex Pilosov <alex@pilosoft.com>)
List pgsql-hackers
Patch removed from queue, awaiting updated version.

> 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
> 

Content-Description: 

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Update on Access 97 and = NULL
Next
From: Tom Lane
Date:
Subject: Re: Encrypting pg_shadow passwords