Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants
Date
Msg-id 23232.1218568047@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants
List pgsql-bugs
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> Here we go. Now that I see it, I do like this approach better.

Hm, the "Assert(rte->subquery != NULL)" doesn't seem right ...
couldn't there be non-RTE_SUBQUERY rtes in the child?  I think the
original coding was guaranteed to visit only subquery-type RTEs
but I'm much less convinced about this one.  It might
be better to say
    if (rte->rtekind == RTE_SUBQUERY)
        IncrementVarSublevelsUp(...);

Or maybe it's okay; I'm too lazy to recheck the representation of
UNION ALL right now.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants