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 fairly serious drawback: if you get an error
in a parameterized query, there's no way at all to find out via logging
what the parameters were that it failed on.  That seems to negate one
of the main uses of the parameter-value-logging code that we put so much
work into in this cycle.

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. 

We could improve the wording here, perhaps, but ultimately this is a
documentation issue.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to