Re: Privileges and inheritance

Поиск
Список
Период
Сортировка
От KaiGai Kohei
Тема Re: Privileges and inheritance
Дата
Msg-id 4AC99FE7.7030408@ak.jp.nec.com
обсуждение исходный текст
Ответ на Re: Privileges and inheritance  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Privileges and inheritance  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:
> On Mon, 2009-10-05 at 12:15 +0900, KaiGai Kohei wrote:
>> On the other hand, it also needs to check permission both of child
>> table and its parents when we select data from a table with its
>> parents,
> 
> You can't do that anyway.

Sorry, I'm not clear why it is impossible.

If we adopt the perspective that inherited columns are a part of
the parent tables, it is quite natural to bypass permisson checks
on the child tables, when we select data from the parent table.
However, we also can select data from the child table which contains
inherited columns from the parent table. In this case, it seems to me
unnatural to bypass permission checks on the parent tables/columns,
although it adopts the perspective.

What I wanted to say is...

For example)

CREATE TABLE tbl_p (int a, int b);
CREATE TABLE tbl_c (int x) INHERITS(tbl_p);

SELECT a,b FROM tbl_p;  --> It selects data from only tbl_p.                           It is reasonable to bypass
checkson tbl_c.
 
SELECT b,x FROM tbl_c;  --> It selects data from tbl_p and tbl_c concurrently,                           if we consider
theinherited columns are a part of                           the parent table.
 
SELECT x FROM tbl_c;    --> ???                           In this case, I don't think it is necessary to check
                permissions on the parent table.
 

Am I missing something?

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Privileges and inheritance
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Privileges and inheritance