Re: Collation problem?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Collation problem?
Дата
Msg-id CAB7nPqSEWtw1m8WEVOWOjF_BQmF_vCn9M3JJk3BcSyBorMr0qQ@mail.gmail.com
обсуждение исходный текст
Ответ на Collation problem?  (Bjørn T Johansen <btj@havleik.no>)
Список pgsql-general
On Sun, Apr 26, 2015 at 5:02 PM, Bjørn T Johansen wrote:
> And my problem is that I am using Norwegian in some tables and when using order by the sort order is not correct for
theNorwegian letters.. 
> So my guestion is if it is possible to get the correct sort order without recreating all my databases or initialize
PGSQL?

You can enforce the collate used in an ORDER BY clause:
SELECT a, b, c FROM tbl WHERE ... ORDER BY a COLLATE "C";
http://www.postgresql.org/docs/devel/static/sql-expressions.html#SQL-SYNTAX-COLLATE-EXPRS
Regards,
--
Michael


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

Предыдущее
От: Bjørn T Johansen
Дата:
Сообщение: Collation problem?
Следующее
От: "Gunnar \"Nick\" Bluth"
Дата:
Сообщение: Re: Collation problem?