Re: log_statement not working on pl/pgsql functions

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Fernando Moreno <azazel(dot)7(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: log_statement not working on pl/pgsql functions
Date: 2008-09-06 02:25:58
Message-ID: 200809060225.m862PwA02636@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Fernando Moreno wrote:
> Hi, I've changed the setting log_statement to mod, in order to log data
> modifications, and it's working fine with sentences sent by the client
> application (psql included), but insert/update/delete sentences executed
> inside functions are not logged. Functions are called in a select query.
>
> I've reloaded (even restarted) the server, the line with the setting is
> uncommented and "show log_statement" returns "mod". I changed its value to
> "all" for a while and it worked as expected, logging every single query. By
> the way, I'm using Postgresql 8.3.1 on window xp.
>
> Am I doing something wrong?

The problem is that the checks for the statement type are done at the
time the query arrives from the client, not while executing in a
function.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2008-09-06 07:49:05 Re: Oracle and Postgresql
Previous Message Ow Mun Heng 2008-09-06 00:13:55 Re: max_stack_depth Exceeded