Re: BUG #1794: inheritance removes permissions from the parent table - Mailing list pgsql-bugs

From Michael Fuhr
Subject Re: BUG #1794: inheritance removes permissions from the parent table
Date
Msg-id 20050728135113.GA76018@winnie.fuhr.org
Whole thread Raw
In response to BUG #1794: inheritance removes permissions from the parent table  ("Sean Burlington" <sean@uncertainty.org.uk>)
Responses Re: BUG #1794: inheritance removes permissions from the parent
List pgsql-bugs
On Thu, Jul 28, 2005 at 12:48:35PM +0100, Sean Burlington wrote:
>
> Description:        inheritance removes permissions from the parent table

I think a more accurate description would be "permissions not
inherited by children," and that isn't necessarily a bug.

> If you create a new table that inherits from another table - a user cannot
> select from the parent if they cannot select from the child.

[snip]

> select * from a;
> ERROR:  permission denied for relation b
>
> I didn't expect to need permission for table b in order to select from a...

Records in the child are visible when you select from the parent,
so it follows that you'd need permission on both tables.  If you
want only records that are in the parent then use FROM ONLY:

SELECT * FROM ONLY a;

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-bugs by date:

Previous
From: "David Dabney"
Date:
Subject: Re: Insert statement changes timestamp value from MS Access
Next
From: Michael Fuhr
Date:
Subject: Re: BUG #1796: UNION ALL of NULL <=> type = text so mimack pb