Alexey Mahotkin writes:
> AFAIK, currently the codepoints are sorted in their numerical order.  I've
> searched the source code and could not find the actual place where this is
> done.  I've seen executor/nodeSort.c and utils/tuplesort.c.  AFAIU, they
> are generic sorting routines.
PostgreSQL uses the operating system's locale routines for this.  So the
sort order depends on choosing a locale that can deal with Unicode.
-- 
Peter Eisentraut   peter_e(at)gmx(dot)net