Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZNQa8-0005tN-Bp for pgsql-sql@arkaria.postgresql.org; Thu, 06 Aug 2015 19:12:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZNQa7-0000Xj-BP for pgsql-sql@arkaria.postgresql.org; Thu, 06 Aug 2015 19:11:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZNQZA-0007uN-0a for pgsql-sql@postgresql.org; Thu, 06 Aug 2015 19:11:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZNQZ6-0005ny-RL for pgsql-sql@postgresql.org; Thu, 06 Aug 2015 19:10:59 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t76JAVeo016389; Thu, 6 Aug 2015 15:10:31 -0400 From: Tom Lane To: "David G. Johnston" cc: Adrian Klaver , "Richard RK. Klingler" , "pgsql-sql@postgresql.org" Subject: Re: IP address, subnet query behaves wrong for /32 In-reply-to: References: <1FC8E571-8456-4085-B59B-016ECD365768@klingler.net> <55C39320.4010905@aklaver.com> Comments: In-reply-to "David G. Johnston" message dated "Thu, 06 Aug 2015 10:07:41 -0700" Date: Thu, 06 Aug 2015 15:10:31 -0400 Message-ID: <16388.1438888231@sss.pgh.pa.us> X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org "David G. Johnston" writes: > On Thu, Aug 6, 2015 at 10:02 AM, Adrian Klaver > 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 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql