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

From Tom Lane
Subject Re: Statements with syntax errors are not logged
Date
Msg-id 11558.1161269106@sss.pgh.pa.us
Whole thread Raw
In response to Statements with syntax errors are not logged  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Statements with syntax errors are not logged  (Peter Eisentraut <peter_e@gmx.net>)
Re: Statements with syntax errors are not logged  ("Adrian Maier" <adrian.maier@gmail.com>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> When setting log_statement = 'all', statements that fail parsing are not
> logged.
> Is that intentional?

The 'mod' and 'ddl' settings obviously can't be handled until after
basic parsing.  We could create a completely separate code path for
'all' but I'm not sure I see the point.  To some extent the logging
settings are only meant to capture successfully executed statements
(eg, you don't get duration for a failed command, either) --- which
should be OK since failed ones won't change the database state.
As you say, log_min_error_statement is orthogonal.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Statements with syntax errors are not logged
Next
From: Peter Eisentraut
Date:
Subject: Re: Statements with syntax errors are not logged