Way to reverse ordering of an IP ... ?

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Way to reverse ordering of an IP ... ?
Date: 2006-09-06 03:51:00
Message-ID: 20060906004355.V13992@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664

Browse pgsql-sql by date

  From Date Subject
Next Message Dinesh Tiwari 2006-09-06 05:30:19 Query regarding to MS reporting services (Grand total problem)
Previous Message Aaron Bono 2006-09-05 16:10:16 Re: Postgres regexp matching failure?