Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E8318633214 for ; Sat, 8 May 2010 21:44:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 65323-08 for ; Sun, 9 May 2010 00:44:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1BB6A632D41 for ; Sat, 8 May 2010 21:44:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o490iFOv018128; Sat, 8 May 2010 20:44:15 -0400 (EDT) To: ABBAS SHAKEEL cc: pgsql-admin@postgresql.org Subject: Re: inet Operator Does not exists In-reply-to: References: Comments: In-reply-to ABBAS SHAKEEL message dated "Sat, 08 May 2010 23:56:43 +0500" Date: Sat, 08 May 2010 20:44:15 -0400 Message-ID: <18127.1273365855@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/110 X-Sequence-Number: 34583 ABBAS SHAKEEL writes: > CREATE FUNCTION inet_to_bigint(inet) RETURNS bigint AS $$ > SELECT $1 - inet '0.0.0.0' > $$ LANGUAGE SQL; > Now above querry works fine for 8.3 but not for 8.1. I was wondering if > there is some thing wrong from my side. Per the 8.2 release notes: * Add convenient arithmetic operations on INET/CIDR values (Stephen R. van den Berg) The new operators are & (and), | (or), ~ (not), inet + int8, inet - int8, and inet - inet. regards, tom lane