Re: auditing in postgresql

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

"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.

The subselect trick is a bit of a hack, but at present it'll work to
guarantee that the function is called only once per plan execution.
(That's because we'll treat an "uncorrelated" subquery as an InitPlan
even if it contains volatile functions, which strictly speaking we
should not; but it's a sufficiently useful behavior that I wouldn't want
to get rid of it without providing a more principled substitute ...)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2007-08-31 20:42:48 Re: auditing in postgresql
Previous Message Merlin Moncure 2007-08-31 19:51:53 Re: auditing in postgresql