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

Re: Unicode UTF-8 table formatting for psql text output

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Brad T(dot) Sliger" <brad(at)sliger(dot)org>, pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>, Selena Deckelmann <selenamarie(at)gmail(dot)com>, Roger Leigh <rleigh(at)codelibre(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Roger Leigh <rleigh(at)debian(dot)org>
Subject: Re: Unicode UTF-8 table formatting for psql text output
Date: 2009-09-29 19:04:42
Message-ID: 1254251082.9276.2.camel@vanquo.pezone.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, 2009-09-29 at 12:01 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > On Mon, 2009-09-28 at 20:49 -0700, Brad T. Sliger wrote:
> >> pg_regress clears LC_ALL by default, but does not clear LANG
> >> by default.  Please find attached a patch that 
> >> causes pg_regress to also clear LANG by default.
> 
> > It probably doesn't matter much, but I think the proper fix would be to
> > unset LC_CTYPE.

(Actually, I should have said, set LC_CTYPE to C.)

> Wouldn't we have to clear *all* of these variables to be sure?

Not really.  The problem here is that psql checks whether the console
uses UTF8, and that is controlled by the LC_CTYPE variable on Unix-ish
systems.

> The bigger question is exactly how we expect this stuff to interact with
> pg_regress' --no-locale switch.  We already do clear all these variables
> when --no-locale is specified.  I am wondering just what --locale is
> supposed to do, and whether selectively lobotomizing the LC stuff has
> any real use at all.

We should do the LANG or LC_CTYPE thing only on the client,
unconditionally.  The --no-locale/--locale options should primarily
determine what the temporary server uses.


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-09-29 20:07:00
Subject: Re: patch: Review handling of MOVE and FETCH (ToDo)
Previous:From: Mark MielkeDate: 2009-09-29 18:58:44
Subject: Re: Rejecting weak passwords

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