Re: Log_statement behaviour a little misleading?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Log_statement behaviour a little misleading?
Date: 2004-01-15 07:13:57
Message-ID: 20132.1074150837@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Kirkwood <markir(at)paradise(dot)net(dot)nz> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2004-01-15 07:23:12 Mailing list? was Postgress and MYSQL
Previous Message Chris Travers 2004-01-15 07:05:17 Re: what we need to use postgresql in the enterprise