"Florian Wunderlich" <fwunderlich(at)factor3(dot)de> writes:
> The following commands are
> used in a file encoded in iso-8859-1:
> set client_encoding='utf-8';
> select upper('');
Isn't that pilot error, plain and simple? You told the machine your
input is in utf8, not latin1.
regards, tom lane