Re: spanish locale question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: spanish locale question
Дата
Msg-id 8396.1336152711@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: spanish locale question  (Al Eridani <al.eridani@gmail.com>)
Ответы Re: spanish locale question  (Andreas Joseph Krogh <andreak@officenet.no>)
Список pgsql-general
Al Eridani <al.eridani@gmail.com> writes:
> What Tulio is saying is that 'leon' and 'le�n' are the same thing from
> the point of view of sorting in Spanish, but his PostgreSQL seems to
> think that 'leon' goes before 'le�n'.

Postgres never considers that two distinct strings are "equal".  If the
locale setting considers these equal (which isn't entirely clear from
the given evidence), PG would then sort them on the basis of their
character code values.

A possible workaround if you need to consider them equal is to strip the
accents before sorting (ie, something like "ORDER BY to_ascii(col)") but
this may well throw away more information than you want ...

            regards, tom lane

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

Предыдущее
От: leaf_yxj
Дата:
Сообщение: How to know there is any ODBC Driver installed in the Linux redhat 5.7 server? Thanks
Следующее
От: Ben Chobot
Дата:
Сообщение: Re: .pgpass not working