Tom Lane writes:

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

Yeah, it's a bit funny.  I wanted to keep the fcache code from doing
anything not to do with caching, and I wanted to keep the permission check
in the executor, like it is for tables.

There were a couple of cases, which I have not fully explored yet, for
which this seemed like a good idea, such as some functions being in the
plan but not being executed, or the permission check being avoided for
some functions (e.g., cast functions).

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to