Bill Moseley <moseley@xxxxxxxx> writes: > - To clarify the first point, if the database is encoded utf-8 and > lc_collate is en_US then Postgresql does NOT try to convert utf-8 to > 8859-1 before sorting. Basically, this is a horribly bad idea and you should never do it. The database encoding should always match what the locale assumes for its character set (unless the locale is "C", which doesn't care). We'd enforce that you never do it if we knew a portable way to determine the character set assumed by an LC_COLLATE setting. regards, tom lane