Re: BUG #4281: some types of errors do not log statements - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4281: some types of errors do not log statements
Date
Msg-id 23391.1219461107@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4281: some types of errors do not log statements  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
Bruce Momjian <bruce@momjian.us> writes:
> thomas wrote:
>> 2008-07-05 02:16:15 CEST 6644 486ebab4.19f4 127.0.0.1(1616)ERROR:  invalid
>> byte sequence for encoding "UTF8": 0xc474

> I am unclear what would cause this.

An encoding violation in an incoming SQL command would cause it, because
we won't have set debug_query_string yet.  And there is no easy fix for
that, because we certainly don't want to have illegally encoded data
inside the backend.  The best possible scenario would be that you get
a different error while trying to translate the string back out for the
client, and the worst would be one of those recursive encoding-error-
during-error-reporting crashes.

I think the short answer is that the OP needs to fix his client code to
not generate queries that are illegally encoded according to what he has
set client_encoding to be.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: FAQ 1.1 has wrong developer's FAQ address
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #4294: XML support: name() xpath function not working