Re: Postgresql INET select and default route ?

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Tim Smith *EXTERN*'" <randomdev4+postgres(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql INET select and default route ?
Date: 2015-12-14 07:52:04
Message-ID: A737B7A37273E048B164557ADEF4A58B5377547B@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Corradini, Carlos 2015-12-14 13:14:02 Re: [GENERAL] plpgsql function with RETURNS SETOF refcursor in JAVA
Previous Message Peter Brady 2015-12-14 01:52:22 Re: [SOLVED] Postgre Fails To Start in Multi-User Mode