Corey Huinker <corey(dot)huinker(at)gmail(dot)com> writes:
> We had difficulty finding the place in the code were LC_COLLATE gets
> recombobulated into a recognized collation.
That's because it isn't.  The DB's default collation boils down to
"call strcoll(), having set LC_COLLATE to whatever pg_database says".
Non-default collations go through strcoll_l(), which might not even
exist on a given platform.  So they're entirely separate code paths.
			regards, tom lane