Re: Limiting user privileges

From: Bradley Kieser <brad(at)kieser(dot)net>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Tad Marko <tmarko(at)metrosplash(dot)com>, Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Limiting user privileges
Date: 2005-01-11 21:23:14
Message-ID: 41E443C2.3090800@kieser.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)metrosplash(dot)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
>
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Goulet, Dick 2005-01-11 21:44:46 Re: PostgreSQL Performance
Previous Message Bruno Wolff III 2005-01-11 21:18:39 Re: Limiting user privileges