Re: Problem with function permission test in a view

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gaetano Mendola <mendola(at)bigfoot(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with function permission test in a view
Date: 2003-09-28 01:20:06
Message-ID: 200309280120.h8S1K6V29714@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I am documenting this behavior in the CREATE VIEW manual page, diff
> > attached.
>
> > + <para>
> > + While access to tables in the view is controlled entirely by permissions
> > + on the view, functions called by the view are checked independently.
> > + </para>
>
> That seems a tad vague, not to say content-free. Perhaps instead say
> "Access to tables referenced in the view is determined by permissions of
> the view owner. However, functions called in the view are treated the
> same as if they had been called directly from the query using the view.
> Therefore the user of a view must have permissions to call all functions
> used by the view."
>
> As I said earlier, it's quite possible that we should consider this a
> mistake. But it's way too late to consider fixing it for 7.4, even if
> we had consensus that it should be changed, which I don't think we do
> yet. In the meantime we should document the behavior clearly.

I like your text much better --- added. I will throw this email in the
7.5 queue and we can decide if it is a bug then.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-28 01:28:33 Re: [SQL] plpgsql doesn't coerce boolean expressions to boolean
Previous Message Bruce Momjian 2003-09-28 01:14:28 Re: [COMMITTERS] pgsql-server/src/backend/executor execScan.c