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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: thomas <me(at)alternize(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4281: some types of errors do not log statements
Date: 2008-08-22 17:49:56
Message-ID: 200808221749.m7MHnuU27465@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

thomas wrote:
>
> The following bug has been logged online:
>
> Bug reference: 4281
> Logged by: thomas
> Email address: me(at)alternize(dot)com
> PostgreSQL version: 8.3.3
> Operating system: Windows 2003
> Description: some types of errors do not log statements
> Details:
>
> this isn't really a bug but rather a request for an improvement.
>
> i've noticed that in some cases of errornous sql statements, the statement
> itself is logged to the pg_log, in other cases it isn't:
>
> logged:
>
> 2008-07-05 01:53:02 CEST 3528 486eade5.dc8 10.1.1.71(53082)ERROR: column
> "xyz" does not exist at character 294
> 2008-07-05 01:53:02 CEST 3528 486eade5.dc8 10.1.1.71(53082)STATEMENT:
> SELECT xyz FROM test
>
>
> not logged:
>
> 2008-07-05 02:16:15 CEST 6644 486ebab4.19f4 127.0.0.1(1616)ERROR: invalid
> byte sequence for encoding "UTF8": 0xc474
> 2008-07-05 02:16:15 CEST 6644 486ebab4.19f4 127.0.0.1(1616)HINT: This error
> can also happen if the byte sequence does not match the encoding expected by
> the server, which is controlled by "client_encoding".
>
>
> it would be usefull to always see the sql statement that provoked the error.
> especially in the case of wrong utf byte sequences it can get very difficult
> to find the point of failure without more information.

I am unclear what would cause this. Is the STATEMENT: line coming from
log_statement? What is the query that is not showing?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Sullivan 2008-08-22 17:59:00 Re: [BUGS] BUG #4279: Bad codepage in our web-site
Previous Message Bruce Momjian 2008-08-22 17:37:42 Re: [BUGS] BUG #4279: Bad codepage in our web-site