Re: Grant SELECT/Execute to View/Function but not underlying Table

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Cc: Alex Magnum <magnum11200(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Grant SELECT/Execute to View/Function but not underlying Table
Date: 2015-09-24 11:54:03
Message-ID: CAKFQuwZanP5qgV7ZLpCs_yLggoNbCWqhsRyXVA443x=OynF26A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, September 24, 2015, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> wrote:

>
>
> On Thu, Sep 24, 2015 at 9:28 PM, Alex Magnum <magnum11200(at)gmail(dot)com
> <javascript:_e(%7B%7D,'cvml','magnum11200(at)gmail(dot)com');>> wrote:
>
>> Hi,
>> is it possible to grant select to views and functions without the need to
>> also grant the user the SELECT privileges to the Tables used in the views
>> or functions?
>>
>> That way I could create read only users on a website and limit their
>> access to the bare minimum.
>>
>>

> for view no it isn't possible (view is query text stored in database for
> future use and nothing more).
>
>
This is not how views are stored nor how they work. The are implemented as
rules and thus the following section of the documentation applies.

http://www.postgresql.org/docs/9.4/interactive/rules-privileges.html

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2015-09-24 12:51:36 Re: Convert number to string
Previous Message Thom Brown 2015-09-24 11:50:15 Re: Grant SELECT/Execute to View/Function but not underlying Table