Statements with syntax errors are not logged - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Statements with syntax errors are not logged
Date
Msg-id 200610191628.18214.peter_e@gmx.net
Whole thread Raw
Responses Re: Statements with syntax errors are not logged  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Statements with syntax errors are not logged  (tomas@tuxteam.de)
List pgsql-hackers
When setting log_statement = 'all', statements that fail parsing are not
logged.  For example:

LOG:  connection received: host=[local]
LOG:  connection authorized: user=peter database=peter
LOG:  statement: select * from pg_class;
LOG:  duration: 19.084 ms
### here a log entry is missing
ERROR:  syntax error at or near "foo" at character 1
### The following shows that post-parser errors are handled correctly.
LOG:  statement: select * from pg_class where reltype = true;
ERROR:  operator does not exist: oid = boolean at character 38
HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.

Is that intentional?

(This is in 8.1 and 8.2 at least.)

(Yes, I realize there is log_min_error_statement, but that is an orthogonal
feature.)

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Fwd: New CRC algorithm: Slicing by 8
Next
From: Tom Lane
Date:
Subject: Re: Statements with syntax errors are not logged