Re: Column-Level Privileges - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Column-Level Privileges
Date
Msg-id 9602.1232508902@sss.pgh.pa.us
Whole thread Raw
In response to Re: Column-Level Privileges  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Responses Re: Column-Level Privileges  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
KaiGai Kohei <kaigai@ak.jp.nec.com> writes:
> Stephen Frost wrote:
>> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>>> On the whole I think we have to go back to the original plan of
>>> recursively searching the query's expressions after we've finished all
>>> the transformations (and have a completed jointree to refer to).
>> 
>> Honestly, I like this approach.

> I agree with Stephen's opinion.
> Indeed, the walker approach requires additional steps during query
> parsing, but the code obviousness is a significant factor from the
> point of view of security.

On looking closer, though, it's *still* messy and unobvious :-(.
There is no single place in the parser where we have the complete
multi-level query tree available in a convenient form for this sort of
postprocessing.

I've thought of a less painful variant of my third option: instead of
making a permanent addition to RangeTblEntry, we can have a transient
data structure attached to ParseState that lets us find the JoinExpr
nodes for already-parsed joins.  I'm going to try that next.
        regards, tom lane


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: Column-Level Privileges
Next
From: Stephen Frost
Date:
Subject: Re: Column-Level Privileges