X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5BCFD9FA6B2 for ; Wed, 6 Sep 2006 00:51:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 51301-02 for ; Wed, 6 Sep 2006 03:51:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from hub.org (hub.org [200.46.204.220]) by postgresql.org (Postfix) with ESMTP id 42D4A9FA0C0 for ; Wed, 6 Sep 2006 00:51:01 -0300 (ADT) Received: from localhost (mx1.hub.org [200.46.208.251]) by hub.org (Postfix) with ESMTP id AD571290C39 for ; Wed, 6 Sep 2006 00:51:00 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 91285-09 for ; Wed, 6 Sep 2006 00:51:00 -0300 (ADT) Received: from ganymede.hub.org (blk-137-83-55.eastlink.ca [24.137.83.55]) by hub.org (Postfix) with ESMTP id EB2BC290C2B for ; Wed, 6 Sep 2006 00:50:59 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 0F91A5FDA5; Wed, 6 Sep 2006 00:51:00 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 0EEF55FD9E for ; Wed, 6 Sep 2006 00:51:00 -0300 (ADT) Date: Wed, 6 Sep 2006 00:51:00 -0300 (ADT) From: "Marc G. Fournier" X-X-Sender: scrappy@ganymede.hub.org To: pgsql-sql@postgresql.org Subject: Way to reverse ordering of an IP ... ? Message-ID: <20060906004355.V13992@ganymede.hub.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/31 X-Sequence-Number: 26242 for Reverse DNS purposes, I'd like to reverse an IP ... ie: 200.46.204.1 would become 1.204.46.200 Is there an easy way of doing this *short* of writing a plpgsql function? I've checked the docs, and found the substring() function that allows for using a regex, which I thought might allow this, but can't seem to figure out a proper format for it ;( If I have to write a function to do it, fine ... just wanted to make sure I wasn't missing something first ... ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email . scrappy@hub.org MSN . scrappy@hub.org Yahoo . yscrappy Skype: hub.org ICQ . 7615664