Re: Making the regression tests locale-proof

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making the regression tests locale-proof
Date: 2002-05-10 23:23:15
Message-ID: 2572.1021072995@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-05-10 23:24:16 Re: Unbounded (Possibly) Database Size Increase - Test
Previous Message Iavor Raytchev 2002-05-10 22:34:43 pgaccess.org - invitation for a working meeting