Re: cidr data type question

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: cidr data type question
Дата
Msg-id 4AEE998E.1080502@hogranch.com
обсуждение исходный текст
Ответ на cidr data type question  (Vasiliy G Tolstov <v.tolstov@selfip.ru>)
Ответы Re: cidr data type question  (Vasiliy G Tolstov <v.tolstov@selfip.ru>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: pg_start_backup question
Следующее
От: Vasiliy G Tolstov
Дата:
Сообщение: Re: cidr data type question