Re: How to sort strings containing a dot?

Поиск
Список
Период
Сортировка
От Steve Wampler
Тема Re: How to sort strings containing a dot?
Дата
Msg-id 47E931B2.6090405@noao.edu
обсуждение исходный текст
Ответ на Re: How to sort strings containing a dot?  (Pierre LEBRECH <pierre.lebrech@laposte.net>)
Список pgsql-general
Pierre LEBRECH wrote:
> But I have found a solution which works :
>
> select name from (select distinct name from t) as name order by replace(name, '.', 'a');

Shouldn't you replace '.' with a character whose collating sequence is strictly less than
'a'?  This solution looks to me as though it might not get ,e.g., 'coast' and 'co.st' in
the desired order except by chance.

--
Steve Wampler -- swampler@noao.edu
The gods that smiled on your birth are now laughing out loud.

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

Предыдущее
От: "Anton Melser"
Дата:
Сообщение: Re: Client-requested cast mode to emulate Pg8.2 on v8.3
Следующее
От: "Bill Wordsworth"
Дата:
Сообщение: PostgreSQL, clusters and load-balance