pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bradley Kieser <brad@kieser.net>
To: Bruno Wolff III <bruno@wolff.to>
Cc: Tad Marko <tmarko@metrosplash.com>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Limiting user privileges
Date: Tue, 11 Jan 2005 21:23:14 +0000
Message-ID: <41E443C2.3090800@kieser.net> (raw)
In-Reply-To: <20050111211839.GC19876@wolff.to>
References: <1105377550.11245.0.camel@boojiboy.metrosplash.com>
	<20050110183111.GA2279@winnie.fuhr.org>
	<1105475175.8275.7.camel@boojiboy.metrosplash.com>
	<20050111211839.GC19876@wolff.to>

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
>
>  
>



view thread (8+ messages)  latest in thread

Message-ID: <41E443C2.3090800@kieser.net>
Permalink:  ../41E443C2.3090800@kieser.net/
Also on:    postgresql.org/message-id/41E443C2.3090800@kieser.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: brad@kieser.net, bruno@wolff.to, tmarko@metrosplash.com, mike@fuhr.org
  Subject: Re: Limiting user privileges
  In-Reply-To: <41E443C2.3090800@kieser.net>
  References: <1105377550.11245.0.camel@boojiboy.metrosplash.com> <20050110183111.GA2279@winnie.fuhr.org> <1105475175.8275.7.camel@boojiboy.metrosplash.com> <20050111211839.GC19876@wolff.to> <41E443C2.3090800@kieser.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox