"Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> writes:
> It seems to me that UTF-8 databases are safe.
IIRC we determined that using UTF8 *on both the client and server sides*
is safe. You can get burnt with combinations such as server_encoding =
UTF8 and client_encoding = SJIS (exposing PQescapeString's naivete),
or with client_encoding = UTF8 and server_encoding = anything else
(exposing the server's weak validity checking during conversion).
regards, tom lane