Re: auditing in postgresql - Mailing list pgsql-general

From Tom Lane
Subject Re: auditing in postgresql
Date
Msg-id 1284.1188592200@sss.pgh.pa.us
Whole thread Raw
In response to Re: auditing in postgresql  ("Merlin Moncure" <mmoncure@gmail.com>)
Responses Re: auditing in postgresql
List pgsql-general
"Merlin Moncure" <mmoncure@gmail.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

pgsql-general by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: auditing in postgresql
Next
From: "Merlin Moncure"
Date:
Subject: Re: auditing in postgresql