| From: | Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> |
|---|---|
| To: | Alex Magnum <magnum11200(at)gmail(dot)com> |
| Cc: | 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:47:18 |
| Message-ID: | CAK-MWwT2Hzk1ZBGfOXa7=f98TRZiRFFF3eDG0PCcb-VXXnFMWA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, Sep 24, 2015 at 9:28 PM, Alex Magnum <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.
>
> Thanks in advance for any advise on this
>
> Alex
>
Hi,
For functions it's possible (read about SECURITY DEFINER), for view no it
isn't possible (view is query text stored in database for future use and
nothing more).
--
Maxim Boguk
Senior Postgresql DBA
http://www.postgresql-consulting.ru/ <http://www.postgresql-consulting.com/>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2015-09-24 11:49:58 | Re: Grant SELECT/Execute to View/Function but not underlying Table |
| Previous Message | Alex Magnum | 2015-09-24 11:28:16 | Grant SELECT/Execute to View/Function but not underlying Table |