I wrote:
> Andres Freund <andres@anarazel.de> writes:
>> It'd be helpful if the error message ought to at least include the category
>> being tested, perhaps it's just one category failing or such?
> Yeah, I will poke into this a little harder to see what's going on.
So after a little testing, setlocale(LC_COLLATE, ...) fails to set the
locale to (apparently) anything other than C, but it works for other
categories. The reason is explained by "man setlocale":
Currently, setlocale() returns NULL and fails to change the locale when
LC_COLLATE is modified independently of other values.
It seems that on current NetBSD you have to use setlocale(LC_ALL, ...)
if you want to set the collation category. That's quite annoying
from our perspective, but it's not something I'm excited about fixing.
Given other work going on, we might abandon all this logic soon
anyway.
regards, tom lane