In one of my PostgreSQL databases, the following statement returns true! The other works fine.
select 'A'>'a'
LC_COLLATE
and LC_TYPE
in all of my databases is en_US.UTF-8
.
client_encoding
is UTF8
My database version is 13.2. OS is Linux.
In Unicode order, 'A' shall be smaller than 'a', but it isn't. Any configuration I shall look at?
Is it OS dependent? The other database that works correctly is running on MacOS.
--
select key from json_each('{"A":1, "a":2}') order by key
=> a
and then A
!
More weird:
select key from json_each('{"A":1, "a":2, ":": 3, ":a": 4}') order by key
=> :
, a
, :a
and then A
--
SQL Fiddle the same weird behavior, but DB Fiddle is correct (but its collation is C
).