Re: auditing in postgresql - Mailing list pgsql-general

From Jeff Davis
Subject Re: auditing in postgresql
Date
Msg-id 1188586020.6199.78.camel@dogma.ljc.laika.com
Whole thread Raw
In response to Re: auditing in postgresql  ("Merlin Moncure" <mmoncure@gmail.com>)
Responses Re: auditing in postgresql
List pgsql-general
On Fri, 2007-08-31 at 13:51 -0400, Merlin Moncure wrote:
> > how about this:
> > create view log_yadda sa
> >   select yadda where (select func());
> >
> > the parens around the function call force it to be evaluated as a scalar.
>
> if you declare func() immutable, you can (maybe) remove the parens
> because the planner folds the call to a constant.  This is faster in
> some cases because
>

I like this approach. I'm a little concerned about PREPARE, however. I
think that might only execute the function once and then not on
subsequent calls, which would then not be audited.

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: computing and updating the size of a table with large objects
Next
From: "Merlin Moncure"
Date:
Subject: Re: auditing in postgresql