Re: numeric SORT order

Поиск
Список
Период
Сортировка
От Mitch Vincent
Тема Re: numeric SORT order
Дата
Msg-id 00da01c1a83f$c3c35910$0200000a@Mitch
обсуждение исходный текст
Ответ на numeric SORT order  (Ben Ausden <benedict@navyblue.com>)
Список pgsql-general
select * from whatever order by field1::text::integer;

seems to work..


----- Original Message -----
From: "Ben Ausden" <benedict@navyblue.com>
To: <pgsql-general@postgresql.org>
Sent: Monday, January 28, 2002 1:47 PM
Subject: [GENERAL] numeric SORT order


> Hi,
>
>
> Is there any way to persuade postgresql to sort a VARCHAR column in
numeric
> order first, and then text order?
>
> e.g
>
> 1, 2, 3, 10, 20, 25, 30, 40
>
> instead of:
>
> 1, 10, 2, 20, 25, 3, 30, 40
>
>
> From looking at the docs it seems that sort order is determined by the
> locale settings. Is this right, and would setting my locale to en_US cause
> postgres to use a different sort order?
>
>
> thanks,
> ben
>
> --
> ben ausden
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>


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

Предыдущее
От: teg@redhat.com (Trond Eivind Glomsrød)
Дата:
Сообщение: Re: NEWBIE: Can't unpack RPMs
Следующее
От: Allan Engelhardt
Дата:
Сообщение: Re: numeric SORT order