Re: sorting on inet type?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sorting on inet type?
Дата
Msg-id 11625.985110988@sss.pgh.pa.us
обсуждение исходный текст
Ответ на sorting on inet type?  ("Daniel J. Kressin" <dkressin@globalcrossing.com>)
Список pgsql-general
"Daniel J. Kressin" <dkressin@globalcrossing.com> writes:
> 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

host(ip) produces a text result, so the above sort is according to
string-comparison rules.  If you want a numeric sort why don't
you just "ORDER BY ip"?

            regards, tom lane

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

Предыдущее
От: "Daniel J. Kressin"
Дата:
Сообщение: Re: sorting on inet type?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: sorting on inet type?