pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org, Petr Jelinek <pjmodos@pjmodos.net>
Subject: Re: GRANT ON ALL IN schema
Date: Wed, 17 Jun 2009 10:15:04 -0400
Message-ID: <25515.1245248104@sss.pgh.pa.us> (raw)
In-Reply-To: <200906171644.53717.peter_e@gmx.net>
References: <4A37BF63.50008@pjmodos.net>
	<4A37E122.8070303@pjmodos.net>
	<4A38A956.8080600@pjmodos.net>
	<200906171644.53717.peter_e@gmx.net>

Peter Eisentraut <peter_e@gmx.net> writes:
> I think you should design this with a bit wider scope.  Instead of just "all 
> tables in this schema", think "all tables satisfying some condition".  It has 
> been requested, for example, to be able to grant on all tables that match a 
> pattern.

I'm against that.  Functionality of that sort is available now if you
really need it (write a plpgsql loop around an EXECUTE) and it's fairly
hard to see a clean syntax that is significantly more general than
"GRANT ON schema.*".  In particular I strongly advise against getting
into supporting user-defined predicates in GRANT.  There are good
reasons for not having utility statements evaluate random expressions.

			regards, tom lane



view thread (21+ messages)  latest in thread

Message-ID: <25515.1245248104@sss.pgh.pa.us>
Permalink:  ../25515.1245248104@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25515.1245248104@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net, pjmodos@pjmodos.net
  Subject: Re: GRANT ON ALL IN schema
  In-Reply-To: <25515.1245248104@sss.pgh.pa.us>

* 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