From: | Szymon Guz <mabewlun(at)gmail(dot)com> |
---|---|
To: | Düster Horst <Horst(dot)Duester(at)bd(dot)so(dot)ch> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Deny access materialzsed view |
Date: | 2010-11-24 08:16:43 |
Message-ID: | AANLkTim=xJ2nwtfb3bzvSCmX3hRhT6Zi-T8ey5-A_n7n@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 24 November 2010 08:57, Düster Horst <Horst(dot)Duester(at)bd(dot)so(dot)ch> wrote:
> Hi
>
> I created a materialized view to manage editings via a real postgres view.
> The view has some rules to deliver all inserts, updates and deletes to the
> underlaying table with the appropriate privileges, insert, update and
> delete, for members of an editing role. To avoid editings on the underlaying
> table I want to deny any access except select access to the table for all
> users. Does anyone outside has an idea how to manage the described
> situation?
>
> I'll appreciate any hint.
>
> Regards
> Horst
>
>
> -
>
Hi,
I'd use the security definer/invoker mechanism (
http://www.postgresql.org/docs/9.0/interactive/sql-createfunction.html)
This way you could create special user who is the owner of the rule
functions, and can read/write to the table, and normal user, who cannot
read/write to the table, but can run those functions.
regards
Szymon Guz
From | Date | Subject | |
---|---|---|---|
Next Message | Elliot Chance | 2010-11-24 09:59:59 | Re: pg_dump and XID limit |
Previous Message | Düster Horst | 2010-11-24 07:57:59 | Deny access materialzsed view |