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 checks on tbl_c. SELECT b,x FROM tbl_c; --> It selects data from tbl_p and tbl_c concurrently, if we consider the inherited 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 <kai...@ak.jp.nec.com> -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers