Re: auditing in postgresql

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: auditing in postgresql
Date: 2007-08-31 21:11:22
Message-ID: 1188594682.6199.85.camel@dogma.ljc.laika.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2007-08-31 at 16:42 -0400, Merlin Moncure wrote:
> On 8/31/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Merlin Moncure" <mmoncure(at)gmail(dot)com> writes:
> > > At present, immutable functions are only treated as constants during a
> > > query, which is what we want (no problems with prepare).
> >
> > Uh, no, they'd be folded to constants at plan time, which is exactly
> > what Jeff doesn't want AFAICS.
>
> yikes! I did test this before I posted that, but I oversimplified it:
> I didn't move the func() to the where clause...do the subselect
> version defined as volatile seems the way to go. unfortunately this
> means you pay a small extra price for large result sets.
>

That sounds like a good solution to me. It looks like the planner is
able to optimize the queries, and the audit function is only called
once. It sounds like I may need to beware of future changes, however.

What is the small extra price for large tables though?

Thanks for the help!

Regards,
Jeff Davis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Decibel! 2007-08-31 21:17:50 Re: [GENERAL] Undetected corruption of table files
Previous Message Merlin Moncure 2007-08-31 20:42:48 Re: auditing in postgresql