Joe Conway <mail(at)joeconway(dot)com> writes:
> Tom Lane wrote:
>> But that reminds me, weren't you going to add something to force
>> libpq to set client_encoding to the database encoding?
> I think the attached is what you had in mind.
Looks plausible to me.
> But I don't know right off
> how to trigger the failure (and therefore how to test the solution). A
> naive test with two databases, one LATIN2, the other UTF8 does not
> produce the error with simple text literals. Any guidance on specific
> literals that would trigger the problem?
Hmm, sending some non-ASCII characters from the LATIN2 end to the UTF8
end should do it, I would think. The other direction would probably
not show any immediate error.
regards, tom lane