Re: Log_statement behaviour a little misleading?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Log_statement behaviour a little misleading?
Дата
Msg-id 20132.1074150837@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Log_statement behaviour a little misleading?  (Mark Kirkwood <markir@paradise.net.nz>)
Ответы Re: Log_statement behaviour a little misleading?  (Mark Kirkwood <markir@paradise.net.nz>)
Re: Log_statement behaviour a little misleading?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
Mark Kirkwood <markir@paradise.net.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Nolan
Дата:
Сообщение: Re: Schemas not created on restore
Следующее
От: "Chris Travers"
Дата:
Сообщение: Re: Postgress and MYSQL