From: | Vasiliy G Tolstov <v(dot)tolstov(at)selfip(dot)ru> |
---|---|
To: | John R Pierce <pierce(at)hogranch(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: cidr data type question |
Date: | 2009-11-02 08:49:25 |
Message-ID: | 1257151765.3426.22.camel@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
В Пнд, 02/11/2009 в 00:34 -0800, John R Pierce пишет:
> 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
>
>
>
Thank You! Does i need to replace ::INET with ::CIDR ша ш гыу cidr data
type or no?
--
Vasiliy G Tolstov <v(dot)tolstov(at)selfip(dot)ru>
Selfip.Ru
From | Date | Subject | |
---|---|---|---|
Next Message | Raimon Fernandez | 2009-11-02 09:15:55 | Re: Cancelling Requests Frontend/Backend Protocol TCP/IP |
Previous Message | John R Pierce | 2009-11-02 08:34:22 | Re: cidr data type question |