Re: RFC: Restructuring pg_aggregate - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: RFC: Restructuring pg_aggregate
Date
Msg-id Pine.LNX.4.30.0204111754100.690-100000@peter.localdomain
Whole thread Raw
In response to Re: RFC: Restructuring pg_aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: RFC: Restructuring pg_aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: numeric/decimal docs bug?
Next
From: Tom Lane
Date:
Subject: Re: RFC: Restructuring pg_aggregate