Vasiliy G Tolstov wrote:
> Hello.
> I have table with cidr data type column (table is white/black list of
> networks).
>
> Does it possible to query - is the some address contains in any cidr
> network in this table? (for all networks in the table do "contains or equals"
>
> http://www.postgresql.org/docs/8.4/interactive/functions-net.html
SELECT * FRMO mytable WHERE mytable.network >>= $1::INET;
that will return all rows of mytable which have a subnet that includes
the IP or subnet $1