Re: IP address, subnet query behaves wrong for /32 - Mailing list pgsql-sql

From Tom Lane
Subject Re: IP address, subnet query behaves wrong for /32
Date
Msg-id 16388.1438888231@sss.pgh.pa.us
Whole thread Raw
In response to Re: IP address, subnet query behaves wrong for /32  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: IP address, subnet query behaves wrong for /32
List pgsql-sql
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Aug 6, 2015 at 10:02 AM, Adrian Klaver <adrian.klaver@aklaver.com>
> wrote:
>> " 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.

No, only one.  There is no difference between '192.168.0.1'::inet and
'192.168.0.1/32'::inet; they're the same value.  The first notation
is merely a shorthand for the second.
        regards, tom lane



pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: IP address, subnet query behaves wrong for /32
Next
From: "Richard RK. Klingler"
Date:
Subject: Re: IP address, subnet query behaves wrong for /32