On tor, 2011-11-10 at 19:30 -0500, Tom Lane wrote:
> 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.
We would have to review the original discussion about that. I can see
arguments for doing it that way and for not doing it that way.
This, however, still doesn't explain why a ALTER ROLE ... SET
client_encoding is not taking effect. After all, a plain SET
client_encoding still works.