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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "Brendan O'Shea" <boshea(at)akamai(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants
Date: 2008-08-12 19:07:27
Message-ID: 23232.1218568047@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Heikki Linnakangas" <heikki(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2008-08-13 07:00:20 Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants
Previous Message Heikki Linnakangas 2008-08-12 18:30:55 Re: BUG #4350: 'select' acess given to views containing "union all" even though user has no grants