Re: Making the regression tests locale-proof - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Making the regression tests locale-proof
Date
Msg-id 2572.1021072995@sss.pgh.pa.us
Whole thread Raw
In response to Making the regression tests locale-proof  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Making the regression tests locale-proof  (Alvaro Herrera <alvherre@atentus.com>)
Re: Making the regression tests locale-proof  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> For that purpose I have changed the permissions on these options to
> USERSET.  (I'm still debating making lc_messages SUSET, because otherwise
> users can screw with admins by changing the language of the log output all
> the time.  Comments?)

Hm.  Don't the regression tests already assume they are run by the
superuser?  They've got create/drop user commands in them.  So I'd
say SUSET is fine from the point of view of the tests, and I agree
with your concern about making the logs unreadable.

> The assumption here is that all locales will choose the same sort order as
> long as they're dealing only with the core 26 letters.

Nope.  For instance, on HPUX I get this sort order in English:

$ LANG=en_US.iso88591 sort testll
eix
ela
ella
ellm
elm
eln
enx

and this in Spanish:

$ LANG=es_ES.iso88591 sort testll
eix
ela
elm
eln
ella
ellm
enx

because the Spanish treat LL as a single collating element.  (Actually,
my very-rusty recollection is that they sort LL the same as one L, which
would mean that HPUX's behavior is not quite right here: it's treating
LL as one symbol that sorts after L.  Linux seems to have no clue that
LL is special at all though...)

> We could also cut down the number of affected tests by making the
> select_implicit and select_having not use mixed-case strings in the test
> tables.  Then we have only char, varchar, and select_views left.

In practice we could perhaps use test data that doesn't hit any of the
special cases in the popular languages.  But I wonder whether this would
not be shirking our responsibility as testers.  Seems like if you avoid
exercising these kinds of cases, you avoid finding corner-case bugs.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Unbounded (Possibly) Database Size Increase - Test
Next
From: Tom Lane
Date:
Subject: Re: Unbounded (Possibly) Database Size Increase - Test