Re: Statements with syntax errors are not logged

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Statements with syntax errors are not logged
Date: 2006-10-19 14:45:06
Message-ID: 11558.1161269106@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-10-19 15:03:08 Re: Statements with syntax errors are not logged
Previous Message Peter Eisentraut 2006-10-19 14:28:17 Statements with syntax errors are not logged