Re: [RRR] Tests citext casts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kenneth Marshall <ktm(at)rice(dot)edu>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RRR] Tests citext casts
Date: 2008-11-07 19:15:38
Message-ID: 22134.1226085338@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-rrreviewers

Kenneth Marshall <ktm(at)rice(dot)edu> writes:
> Thank you for the pointers. lc_collate is set to en_US.UTF-8. I
> re-initdb the database with the --no-locale option and then the
> tests passed successfully. Thank you for the reminder that the
> regression tests need to run against a C locale database.

Actually, they don't expect that; all of the core regression tests pass
under multiple locales. (I think there's even one variant file that's
there specifically to make 'em pass in sv_SE ...) The reason for taking
trouble over this is that "make installcheck" tests against an installed
server, which quite likely isn't using C locale. Since the contrib
modules are *only* testable in "make installcheck" fashion, this is
actually a bigger consideration for them than for the core tests.

In a quick test on a Fedora box, citext is the only core or contrib test
that fails in en_US. (This is true in HEAD, even without having applied
the proposed patch.) It would be good to clean that up.

We could fix it by having multiple variant expected files for C and
non-C locales, which is exactly what the core tests do. However,
I'm loath to apply that approach when the citext test already has XML vs
no-XML variants; we would then need two variant files per locale
variant, which is a bit unreasonable from a maintenance standpoint.

My inclination is to remove the XML-dependent citext tests, which don't
seem especially useful, and then we can have whatever variants we need
for locales. citext locale behavior seems much more interesting than
testing whether it casts to xml or not.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2008-11-07 19:46:06 Re: [RRR] Tests citext casts
Previous Message Alvaro Herrera 2008-11-07 19:11:40 Re: Block-level CRC checks

Browse pgsql-rrreviewers by date

  From Date Subject
Next Message Jaime Casanova 2008-11-07 19:44:11 Re: Assignments for Robert, Jaime, Kenneth, Jeff
Previous Message Josh Berkus 2008-11-07 19:13:51 Change of management