I said:
> I would not have been real surprised to hear that psql's \encoding is
> out of sync, but it *does* surprise me that "show client_encoding" might
> not match pg_client_encoding(). I would think those are looking at the
> same backend state variable. Any theory how that could happen?
It occurs to me that the CVS-tip code tries to set client_encoding much
earlier in backend startup than was the case when this was driven by
a SET command issued by libpq after backend startup completed. However,
it works fine for me. Why isn't it working for you?
regards, tom lane