Re: rights for schema - Mailing list pgsql-general

From Philipp Kraus
Subject Re: rights for schema
Date
Msg-id 38280486-CFCF-4074-A531-95893D2246E5@flashpixx.de
Whole thread Raw
In response to Re: rights for schema  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: rights for schema  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
Am 31.12.2012 um 02:11 schrieb Adrian Klaver:

> On 12/30/2012 04:06 PM, Christian Hammers wrote:
>> Am Sun, 30 Dec 2012 15:54:32 +0100
>> schrieb Philipp Kraus <philipp.kraus@flashpixx.de>:
>>
>>> Hello,
>>>
>>> can I set all rights to a schema and its content? I have different
>>> schema and in the public schema all users should be do everything
>>> (select, update, delete, call functions, etc). Also if I add a new
>>> user, the user should be get also the rights. My other schemas are
>>> only access by the database user only.
>>>
>>> How can I do this?
>>>
>>> Phil
>>
>> AFAIK you can't set all rights for all tables, views, functions etc.
>> inside a schema "recursively" with one command. Neither can you say
>> that, inside a specific schema, every newly created table or function
>> should automatically get a "default" access list.
>> (the "template1" database can only be used to do the latter for newly
>> created databases).
>
> Actually as of 9.0 that is not strictly true:
> http://www.postgresql.org/docs/9.2/interactive/sql-alterdefaultprivileges.html

I have create a view for access a table and rules for modifiy the based table. The table has got a trigger.
If I run an update on the view, I get an error "permission denied" for the trigger call. My user modifies
only the "view", so do the user also get access to the trigger (execution right)? IMHO the trigger is run
by postgres self, so the user don't need a right on the trigger.

Can you explain me the correct accessibility structure of PG?

Phil

pgsql-general by date:

Previous
From: Philipp Kraus
Date:
Subject: Re: rights for schema
Next
From: Robert James
Date:
Subject: Picking the first of an order in an aggregate query