Re: IP address, subnet query behaves wrong for /32

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: "Richard RK(dot) Klingler" <richard(at)klingler(dot)net>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: IP address, subnet query behaves wrong for /32
Date: 2015-08-06 17:07:41
Message-ID: CAKFQuwaj9HFTAU-soNt3mn4rCTJ8FUgHtnTg+ZsV2oGmMT=n8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Aug 6, 2015 at 10:02 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> http://www.postgresql.org/docs/9.2/interactive/functions-net.html
>
> "The operators <<, <<=, >>, and >>= test for subnet inclusion."
>
>
> http://www.postgresql.org/docs/9.2/interactive/datatype-net-types.html#DATATYPE-INET
>
> " If the netmask is 32 and the address is IPv4, then the value does not
> indicate a subnet, only a single host."
>
> So it is behaving as documented.

This seems overly simplified given that "<<=" will indeed match two host
specifications.

David J.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2015-08-06 19:10:31 Re: IP address, subnet query behaves wrong for /32
Previous Message Adrian Klaver 2015-08-06 17:02:24 Re: IP address, subnet query behaves wrong for /32