Re: BUG #15317: Sort order error

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: BUG #15317: Sort order error
Дата
Msg-id 7039133c-fe5b-4036-cba1-c66f24b2c607@iki.fi
обсуждение исходный текст
Ответ на BUG #15317: Sort order error  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On 08/08/18 09:53, PG Bug reporting form wrote:
> When I execute a query
> select 'ALEX DARGAY' >  'ALEXANDER';
> It should return false as output because ascii value of space is lower than
> ascii value of 'A'.
> But the output is true, which is incorrect.

The correct answer to that query depends on the current locale. You seem 
to be assuming that POSIX / C locale is used. You can check the current 
locale's collation order with "show lc_collate;". The locale support is 
provided by the Operating System, so even if the locale is nominally the 
same, e.g. "UK English", it might behave slightly differently on 
different systems.

See the user manual, sections 23.1 Locale Support and 23.2 Collation 
Support for more information:

https://www.postgresql.org/docs/10/static/locale.html
https://www.postgresql.org/docs/10/static/collation.html

- Heikki


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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15318: ERROR: current transaction is aborted,commands ignored until end of transaction block
Следующее
От: Sergei Kornilov
Дата:
Сообщение: Re: BUG #15318: ERROR: current transaction is aborted, commands ignored until end of transaction block