Re: Need help with Inet type

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: Need help with Inet type
Дата
Msg-id 20130911045836.GA62631@reindeer.exwg.net
обсуждение исходный текст
Ответ на Need help with Inet type  (Eric Lamer <eric.lamer@intact.net>)
Список pgsql-general
## Eric Lamer (eric.lamer@intact.net):

>   I can do something like:
>
>    Select * From logs Where src_ip IN (Select ip from ip_table where zone
> = 'ZONE_a');
>
>    Of course that does not work since it does not work with Inet type and
> I cannot use << because I have more than 1 row return from the second
> select.

How about:
   SELECT DISTINCT logs.* FROM logs
     JOIN ip_table ON logs.srcip << ip_table.ip
     WHERE zone = 'ZONE_a';

Regards,
Christoph

--
Spare Space


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

Предыдущее
От: James Sewell
Дата:
Сообщение: pg_largeobjects
Следующее
От: John R Pierce
Дата:
Сообщение: Re: pg_largeobjects