Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Why shouldn't aggregate functions have entries in pg_proc? Then one
>> search would cover both possibilities, and we could eliminate some
>> duplicate code in the parser.
> Furthermore, we could make the new function privileges apply to aggregates
> as well.
GRANT/REVOKE FUNCTION will now work on aggregate functions too (is there
any value in making a variant syntax for aggregates?). However, I
didn't implement enforcement of the EXECUTE privilege yet. I was
slightly bemused to notice that your implementation of it for regular
functions tests the privilege at plan startup but doesn't actually throw
the error until the function is called. What's the point of that?
Seems like we might as well throw the error in init_fcache and not
bother with storing a boolean.
regards, tom lane