Re: BUG #6288: Is ALTER ROLE set client_encoding broken in 9.1? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6288: Is ALTER ROLE set client_encoding broken in 9.1?
Date
Msg-id 20758.1320971432@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6288: Is ALTER ROLE set client_encoding broken in 9.1?  (Maxim Boguk <maxim.boguk@gmail.com>)
Responses Re: BUG #6288: Is ALTER ROLE set client_encoding broken in 9.1?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
Maxim Boguk <maxim.boguk@gmail.com> writes:
> However personally I'm think this behavior is rather non-intuitive:

> postgres@db13:~$ psql -U slony -d test -c 'show client_encoding'
>  client_encoding
> -----------------
>  UTF8
> (1 row)

> postgres@db13:~$ psql -U slony -d test -c 'show client_encoding' | head -10
>  client_encoding
> -----------------
>  KOI8R
> (1 row)

I think psql only pays attention to its locale when stdout is a tty.
Now *why* it acts like that, I'll leave for Peter to defend.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: HElp
Next
From: Bruce Momjian
Date:
Subject: Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"