Re: New patch for Column-level privileges

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: New patch for Column-level privileges
Дата
Msg-id 20090108203451.GU26233@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: New patch for Column-level privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: New patch for Column-level privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom, et al,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> KaiGai Kohei <kaigai@ak.jp.nec.com> writes:
> > ExecCheckRTEPerms() checks user's privileges on columns, when he does
> > not have required privileges on the table. When he has proper privileges
> > on all the appeared columns within the table, it is allowed.
> > But, when no columns are used on the table, it applies result of checks
> > on the table.
>
> Surely the SQL spec tells us what to do here (and I cannot believe this
> is it...)

Based on what I see in the SQL spec, we have to allow table references
like this when the user has SELECT rights on at least one column of the
table.  If the column is referenced anywhere (SELECT clause, WHERE
clause, JOIN clause, through a NATURAL JOIN, etc) then the user must
have SELECT rights on the mentioned column(s).

I'm open to suggestions about how to handle this.  My first thought
would be- add an entry to the cols_sel list for the RTE that is special
and indicates "any column", perhaps by using a '0' for the attrid, as is
done elsewhere.  Then modify ExecCheckRTEPerms() to handle it.
Thanks,
    Stephen

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Significant oversight in that #include-removal script
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Hot standby, slot ids and stuff