Re: BUG #18857: Abnormal string comparison results

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18857: Abnormal string comparison results
Дата
Msg-id 985480.1742481975@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #18857: Abnormal string comparison results  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> As shown in the example below, on the ASCII table ‘?’ is larger than ‘&’. I
> don't think ‘t’ should be returned here. In the MySQL database it does
> return 0.
> Is there some special consideration here?

Read about collations at

https://www.postgresql.org/docs/current/collation.html

You are probably using a non-C collation.  You could say

postgres=# SELECT ('?' <= '&*CcCV5' collate "C");
 ?column?
----------
 f
(1 row)

but more likely you want to switch it at the database level.

            regards, tom lane



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