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-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

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 create

[HACKERS] Statements with syntax errors are not logged

2006-10-19 Thread Peter Eisentraut
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:

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 I'm

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 the

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

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 should do

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 got a

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.