Mark Kirkwood <[EMAIL PROTECTED]> writes: > So setting "log_statement=true" does all *statements* - but not all > *executions* of each statement. Is this the intention?
AFAIK this is an implementation artifact that's never really been discussed. Another aspect of the artifact is that SQL commands appearing in plpgsql functions will be logged only on first execution in a session. I think you could make a fair argument that "log_statement" ought to log only commands received from the client application. There would be real value in being able to trace execution of plpgsql functions, but such a feature would have very little to do with log_statement as it now stands. The fact that RI triggers issue SQL commands is an artifact of their implementation (and one that I believe Stephan and Jan would like to get rid of); they shouldn't be cluttering the log at all. At least that's what it seems like to me after a few moments' reflection. Other opinions out there? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])