Re: BUG #1794: inheritance removes permissions from the parent table

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Sean Burlington <sean(at)uncertainty(dot)org(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1794: inheritance removes permissions from the parent table
Date: 2005-07-29 03:53:04
Message-ID: 20050729035303.GA35197@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

On Thu, Jul 28, 2005 at 03:56:14PM +0100, Sean Burlington wrote:
> Michael Fuhr wrote:
> > 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.
>
> I agree it may not be a bug - but it's more than the permissions not
> being inherited: the parent is affected.

Not really, once you understand what's happening. Unless you use
FROM ONLY, selecting from the parent selects from the parent *and*
its children. The parent itself isn't affected, as queries with
FROM ONLY should demonstrate. I understand what you're saying --
that there's an apparent effect on the parent -- but there really
isn't.

> It would be handy if this was in the documentation for anyone else who
> comes across this issue

Feel free to submit a documentation patch to pgsql-patches :-)

> Would it be possible to allow the usual select and just return the
> records the user has permission for - possibly along with a warning
> about the child table?

I think you'd have a hard time selling that to the developers,
because a query that returns successfully but with an incomplete
record set isn't solving any problem. If the problem is inadequate
documentation, then the correct solution is to fix the documentation.

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message 杨邕 2005-07-29 09:36:37 Server broken down in covering GB18030
Previous Message Tom Lane 2005-07-28 20:30:28 Re: BUG #1790: coredump in postgres

Browse pgsql-patches by date

  From Date Subject
Next Message Luke Lonergan 2005-07-29 04:03:20 Re: [PATCHES] COPY FROM performance improvements
Previous Message Neil Conway 2005-07-29 03:45:40 Re: Unused MMCacheLock