Re: BUG #6288: Is ALTER ROLE set client_encoding broken in 9.1?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: BUG #6288: Is ALTER ROLE set client_encoding broken in 9.1?
Date: 2011-11-11 00:30:32
Message-ID: 20758.1320971432@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> writes:
> However personally I'm think this behavior is rather non-intuitive:

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

> postgres(at)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2011-11-11 00:42:41 Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"
Previous Message Craig Ringer 2011-11-11 00:23:22 Re: HElp