"bishop" <polimax(at)mail(dot)ru> writes:
> PQsetClientEncoding(conn,"WIN1251");
> res = PQexec(conn, "INSERT INTO \"table_name\" (\"name\") VALUES
> ('test');");
What do you get, exactly, if you do the same command but with
client_encoding = UTF8? I suppose this must be a problem with
failing to convert the encoding of an error message, but without
knowing what the original error message is, it's hard to investigate.
regards, tom lane