Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZNR7w-0007iX-Rr for pgsql-sql@arkaria.postgresql.org; Thu, 06 Aug 2015 19:46:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZNR7w-0006xs-EX for pgsql-sql@arkaria.postgresql.org; Thu, 06 Aug 2015 19:46:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZNR6x-00053M-QZ for pgsql-sql@postgresql.org; Thu, 06 Aug 2015 19:45:55 +0000 Received: from proofpoint1.mail.rice.edu ([128.42.201.100] helo=pp1.rice.edu) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZNR6v-0006uA-2x for pgsql-sql@postgresql.org; Thu, 06 Aug 2015 19:45:54 +0000 Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.15.0.59/8.15.0.59) with SMTP id t76JiDaS025283; Thu, 6 Aug 2015 14:45:32 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp1.rice.edu with ESMTP id 1w339rs9x0-1; Thu, 06 Aug 2015 14:45:32 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.rice.edu (aart.rice.edu [168.7.56.48]) by mh1.mail.rice.edu (Postfix) with ESMTP id 5C062460378; Thu, 6 Aug 2015 14:45:32 -0500 (CDT) Received: by aart.rice.edu (Postfix, from userid 18612) id 535C0100881; Thu, 6 Aug 2015 14:45:32 -0500 (CDT) Date: Thu, 6 Aug 2015 14:45:32 -0500 From: "ktm@rice.edu" To: "Richard RK. Klingler" Cc: "pgsql-sql@postgresql.org" Subject: Re: IP address, subnet query behaves wrong for /32 Message-ID: <20150806194532.GL539@aart.rice.edu> References: <1FC8E571-8456-4085-B59B-016ECD365768@klingler.net> <55C39320.4010905@aklaver.com> <16388.1438888231@sss.pgh.pa.us> <10B2FB45-DFE8-4075-BFB0-36023ADF9837@klingler.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10B2FB45-DFE8-4075-BFB0-36023ADF9837@klingler.net> User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1508060309 X-Pg-Spam-Score: -4.3 (----) 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 On Thu, Aug 06, 2015 at 07:35:19PM +0000, Richard RK. Klingler wrote: > Thanks to all for the clarifications... > > I'm looking at this form an application perspective... > as this would greatly enhance an IPAM database web application. > > Sad there is no direct IP address sorting function like in MySQL (o; > > > cheers from .ch > richard > What about: select * from table order by inet(IP-ADDRESS); Seems pretty straight-forward. What does MySQL do? Regards, Ken -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql