Kristian Jörg <krjg@devo.se> writes:
> Unfortunately this does not seem to help! I dumped the database,
> recreated the cluster with initdb with LC_COLLATE = C (and even tried
> setting LC_CTYPE to C also), and restored the database. The same
> ordering appears...
You didn't do it right then ...
7.2's initdb is not helpful about telling you exactly what locale
settings it's using, but you could use the contrib/pg_controldata
utility to check what LC_COLLATE and LC_CTYPE settings got used.
(If you don't want to build pg_controldata, "strings
$PGDATA/global/pg_control" will do as a rough-and-ready substitute.)
Theoretically it should work to doexport LC_COLLATE=Cexport LC_CTYPE=Cinitdb
but if you have LANG or other LC_xxx values in your environment,
it's possible that there is some conflict.
regards, tom lane