Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Avoid locale dependency in expected output.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Avoid locale dependency in expected output.
Date: 2011-08-27 16:20:43
Message-ID: 18149.1314462043@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Avoid locale dependency in expected output.
>> 
>> We'll have to settle for just listing the extensions' data types,
>> since function arguments seem to sort differently in different locales.
>> Per buildfarm results.

> This could probably be worked around by using COLLATE "C" in psql \df
> and \do.  That would probably make sense, because the argument types are
> by themselves of type "name", so a list of them should perhaps sort like
> "name" as well.

I did consider that, but the PITA factor looked too large.  Currently
the SQL code is like 'ORDER BY 1,2,4'.  We can't do '4 COLLATE "C"'
for syntactical reasons, so we'd have to repeat the column expression.
There's also the fact that psql couldn't use COLLATE with a pre-9.1
server.  So I wasn't going to propose that just to make a regression
test a bit more complete.

OTOH, if people think that locale-independent ordering of the results
is a good thing in itself, maybe it's worth the trouble.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-08-27 16:28:41
Subject: Re: Cryptic error message in low-memory conditions
Previous:From: Hitoshi HaradaDate: 2011-08-27 16:05:29
Subject: Re: Questions and experiences writing a Foreign Data Wrapper

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group