Re: ip contained within subnet - Mailing list pgsql-general

From Tom Lane
Subject Re: ip contained within subnet
Date
Msg-id 25830.1282244716@sss.pgh.pa.us
Whole thread Raw
In response to ip contained within subnet  (Scott Brunza <scottso@sonalysts.com>)
Responses Re: ip contained within subnet
List pgsql-general
Scott Brunza <scottso@sonalysts.com> writes:
> select a.ip, b.foo from tablea a, tableb, b where a.id=b.id and a.ip ! <<= (select network from assets where network
isnot null) 

This is definitely not legal SQL.  I think you are looking for something
like

select a.ip, b.foo from tablea a, tableb b where a.id=b.id and
  not (a.ip <<= any (select network from assets where network is not null))

            regards, tom lane

pgsql-general by date:

Previous
From: Scott Brunza
Date:
Subject: ip contained within subnet
Next
From: Tom Lane
Date:
Subject: Re: Missing Toast Chunk