Why is my PostgreSQL ORDER BY case-insensitive?
So en_US.UTF-8 and en_US.utf8 have different sort orders?


No, these both are the same, just a different naming convention.


  I'm mystified by why the Debian version appears to be case-insensitive and the OS X version is not.


Yes, you are correct. This is the default behavior on Mac. Collations don't work on any BSD-ish OS (incl. OSX) for UTF8 encoding.

Here is a reference to prove that:

Problems with sort order (UTF8 locales don't work

As a_horse_with_no_name said, Postgres uses the collation implementation from the OS. There is no way to get the same result on both operating systems.

In your case you may(I said maybe)do like this: ORDER BY lower(fieldname).