-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
In Postgres, the sort changes depending on the locale, e.g. C
(byte-wise comparison) or en_US
, hu_HU
, etc.
postgres=# select firstname from (values ('bernard'), ('bérénice'), ('béatrice'), ('boris'), ('Astor'), ('Ástor'))
AS l(firstname)
order by firstname collate "C";
firstname
-----------
Astor
bernard
boris
béatrice
bérénice
Ástor
(6 rows)
postgres=# select firstname from (values ('bernard'), ('bérénice'), ('béatrice'), ('boris'), ('Astor'), ('Ástor'))
AS l(firstname)
order by firstname collate "en_US";
firstname
-----------
Astor
Ástor
béatrice
bérénice
bernard
boris
(6 rows)
Our other reference implementation, Neo4j, uses Java's string ordering (which is collate "C"
in Postgres).
This affects both branches and also needs to be discussed in the specification.
Metadata
Metadata
Assignees
Labels
No labels