Re: BUG #4281: some types of errors do not log statements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: thomas <me(at)alternize(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4281: some types of errors do not log statements
Date: 2008-08-23 03:11:47
Message-ID: 23391.1219461107@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian <bruce(at)momjian(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2008-08-23 03:22:09 Re: BUG #4294: XML support: name() xpath function not working
Previous Message Bruce Momjian 2008-08-23 01:55:58 Re: FAQ 1.1 has wrong developer's FAQ address