Re: Limiting user privileges

From: Tad Marko <tmarko(at)metrosplash(dot)com>
To: Bradley Kieser <brad(at)kieser(dot)net>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Limiting user privileges
Date: 2005-01-11 21:49:32
Message-ID: 1105480172.8275.27.camel@boojiboy.metrosplash.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 2005-01-11 at 21:23 +0000, Bradley Kieser wrote:
> 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.

OK...I think...

I'm not understanding something well enough.

In MySQL (the only DB I'm very familiar with), I can create a database,
import tables, create a user, and then

GRANT ALL ON dbname.* TO whateveruser

and then whateveruser is essentially the super user on that database. I
think that I understand that in PostgreSQL, I need to make whateveruser
the owner of the database, then I won't have to go through the GRANT
step for him.

But, what do I need to do if I need to say easily create users that have
INSERT and SELECT privileges on all (of a large number of) tables in a
given database?

Thanks,
Tad
--
Tad Marko <tmarko(at)metrosplash(dot)com>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Richard_D_Levine 2005-01-11 21:51:48 Re: Limiting user privileges
Previous Message Gregory S. Williamson 2005-01-11 21:47:08 Re: PostgreSQL Performance