On Thu, Sep 10, 2015 at 12:51 PM, Ken Tanzer <ken.tanzer@xxxxxxxxx> wrote: > OK, can one of you help me out in understanding this? I would have thought that given "CLARK," and "CLARKE" that the comma would get compared against the E and come first. End of story, before we even get to anything farther in the string. What am I missing? That's only how it works with the C locale. Otherwise, there are complicated rules to weigh things like space and punctuation (and accents/diacritics) less prominently than primary alphabetical ordering. This is often useful. Anyway, based on what you say here, I think you should actually "ORDER BY name_last, name_first". -- Regards, Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general