Way to reverse ordering of an IP ... ?

Поиск
Список
Период
Сортировка
От Marc G. Fournier
Тема Way to reverse ordering of an IP ... ?
Дата
Msg-id 20060906004355.V13992@ganymede.hub.org
обсуждение исходный текст
Список 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@hub.org                              MSN . scrappy@hub.org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Aaron Bono"
Дата:
Сообщение: Re: Postgres regexp matching failure?
Следующее
От: Dinesh Tiwari
Дата:
Сообщение: Query regarding to MS reporting services (Grand total problem)