Re: sorting on inet type?

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Daniel "J(dot) Kressin" <dkressin(at)globalcrossing(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: sorting on inet type?
Date: 2001-03-20 17:38:21
Message-ID: 20010320.17382100@ler-freebie.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I believe this is fixed in 7.1.

LER

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 3/20/01, 11:16:42 AM, Daniel "J." Kressin <dkressin(at)globalcrossing(dot)com>
wrote regarding [GENERAL] sorting on inet type?:

> I have a table with an inet column, which I entered in order initially,
> so they came out like:

> 1.2.3.4
> 1.2.3.5
> 1.2.3.40
> 1.2.3.41

> After updating, say, 1.2.3.5, it moves to the end. I understand why,
> that's not the problem. Adding an 'ORDER BY host(ip)' clause causes the
> ordering to be:

> 1.2.3.4
> 1.2.3.40
> 1.2.3.41
> 1.2.3.5

> Is there an easy way to return to the original order, or do I need to
> write a custom PL/SQL function to parse the octets and do sorting
> manually? If the latter is the case, help/hints would be appreciated.

> Thanks.

> P.S. Thanks to the group for all the help you've given on my previous
> questions!
> --
> Dan
> ____ Kressin ____ .-----------------------------------.
> /___ \____________/ __ \ | Unix SysAdmin |
> \ \ / / \ | | Global Crossing |
> ___/ __\/\/rench_ \__/ | | dkressin(at)globalcrossing(dot)com |
> \____/ \____/ | http://www.vib.org/wrench/ |
> `-----------------------------------'

> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

> http://www.postgresql.org/search.mpl

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Benjamin Franks 2001-03-20 17:38:22 RE: "critical mass" reached
Previous Message Daniel J. Kressin 2001-03-20 17:16:42 sorting on inet type?