Re: Limiting user privileges - Mailing list pgsql-admin

From Bradley Kieser
Subject Re: Limiting user privileges
Date
Msg-id 41E443C2.3090800@kieser.net
Whole thread Raw
In response to Re: Limiting user privileges  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Limiting user privileges
List pgsql-admin
Or, the best way is to use views and not grant any priviledges on the
table. The view must be created by the table owner and then grant
priviledges on that view to a user. You can then create more than one
view if you need, or else you can set up rules, triggers and procedures
to implement what you want to implement.

This means, for exmample, that if you have a user table that contains
the priviledges that a user might have, you can join in that table in
the view using current_user to get to the row for the present user and
set behaviour accordingly.


Bruno Wolff III wrote:

>On Tue, Jan 11, 2005 at 14:26:15 -0600,
>  Tad Marko <tmarko@metrosplash.com> wrote:
>
>
>>I can
>>
>>GRANT ALL ON a_specific_table TO user
>>
>>but I can't figure out how to simply give some privilege to a user on
>>all tables.
>>
>>
>
>You can't do it with a single GRANT statement. You need to write a script
>or function to do it.
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>
>
>

pgsql-admin by date:

Previous
From: "Lee Wu"
Date:
Subject: Re: Vacuum full - disk space eaten by WAL logfiles
Next
From: "Goulet, Dick"
Date:
Subject: Re: PostgreSQL Performance