Statements with syntax errors are not logged

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Statements with syntax errors are not logged
Date: 2006-10-19 14:28:17
Message-ID: 200610191628.18214.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-10-19 14:45:06 Re: Statements with syntax errors are not logged
Previous Message Andrew Dunstan 2006-10-19 13:53:28 Re: Fwd: New CRC algorithm: Slicing by 8