Re: [HACKERS] Statements with syntax errors are not logged

2006-10-20 Thread Adrian Maier
On 10/19/06, Tom Lane <[EMAIL PROTECTED]> wrote: Peter Eisentraut <[EMAIL PROTECTED]> 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 c

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-20 Thread Peter Eisentraut
Am Freitag, 20. Oktober 2006 09:13 schrieb Adrian Maier: > It would have been much more convenient to see the bad queries in > the logs ... I think you are missing the point of this discussion. All the erroneous queries are logged. The question is merely under what configuration. -- Peter Eis

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-20 Thread Peter Eisentraut
Am Freitag, 20. Oktober 2006 00:32 schrieb Tom Lane: > So I'm inclined to leave the behavior as-is. The documentation for > log_statement already says > > Note: Statements that generate syntax errors are not logged. Set > log_min_error_statement to error to log such statements. Oh, I

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-19 Thread Jim C. Nasby
On Thu, Oct 19, 2006 at 06:32:08PM -0400, Tom Lane wrote: > So I'm inclined to leave the behavior as-is. The documentation for > log_statement already says > > Note: Statements that generate syntax errors are not logged. Set > log_min_error_statement to error to log such statements.

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-19 Thread Tom Lane
I wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: >> Then it should be changed to log *only* successfully executed statements >> and explicitly documented as such. > Well, maybe we should do that. I fooled around with doing that, and while it's a simple code change, I realized that it's go

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-19 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> To some extent the logging >> settings are only meant to capture successfully executed statements > Then it should be changed to log *only* successfully executed statements > and explicitly documented as such. Well, maybe we shou

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-19 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, Oct 19, 2006 at 04:28:17PM +0200, Peter Eisentraut wrote: > When setting log_statement = 'all', statements that fail parsing are not > logged. For example: [...] HA! This one has bitten me just today :-) The problem was a faulty client send

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-19 Thread Peter Eisentraut
Tom Lane wrote: > 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. The users are evidently expecting that "log all statements" means to log all statements issued by t

Re: [HACKERS] Statements with syntax errors are not logged

2006-10-19 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> 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