Peter Eisentraut <peter_e@gmx.net> writes:
> On tis, 2009-11-24 at 14:19 -0500, Tom Lane wrote:
>> I think you're being overoptimistic to assume that that's going to
>> eliminate the issue. It might patch things for Oleg's particular
>> configuration; but the real problem IMO is that people are depending
>> on ~/.psqlrc to set encoding/locale related behavior, and that file
>> isn't read before executing -l/-c (not to mention -X).
> The -l/-c case should probably be fixed. If the output contains
> non-ASCII data, then it's not going to display correctly. Not so much a
> problem for -l, but definitely for -c, and of course with the Unicode
> line drawing now in fact also for -l.
I'm not sure that the "fix" won't be worse than the disease here.
The historical behavior is that .psqlrc isn't read before executing
-c commands, and I don't find it difficult at all to imagine that
changing that will break some people's scripts.
regards, tom lane