Re: Postgresql INET select and default route ? - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Postgresql INET select and default route ?
Date
Msg-id A737B7A37273E048B164557ADEF4A58B5377547B@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to Re: Postgresql INET select and default route ?  (Tim Smith <randomdev4+postgres@gmail.com>)
Responses Re: Postgresql INET select and default route ?  (Tim Smith <randomdev4+postgres@gmail.com>)
List pgsql-general
Tim Smith wrote:
> Re: I am surprised that you don't expect "0.0.0.0/0" to be returned by the first
> query if you expect it to be returned by the second.
> Is that an oversicht?
> 
> Thanks for the question, but no, it wasn't an oversight, I only am
> looking for 0.0.0.0/0 to be returned if there is no more specific
> match.

I see, but then you'll have to use a different query:

SELECT a from test where '11.1.2.3' <<= a
   ORDER BY masklen(a) DESC LIMIT 1;

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Peter Brady
Date:
Subject: Re: [SOLVED] Postgre Fails To Start in Multi-User Mode
Next
From: Vladimir Sitnikov
Date:
Subject: Re: [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA