pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-hackers@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>
Cc: Petr Jelinek <pjmodos@pjmodos.net>
Subject: Re: GRANT ON ALL IN schema
Date: Mon, 10 Aug 2009 10:42:34 +0300
Message-ID: <200908101042.35024.peter_e@gmx.net> (raw)
In-Reply-To: <21246.1249491592@sss.pgh.pa.us>
References: <4A37BF63.50008@pjmodos.net>
	<603c8f070908050951s3e5df452se4c610f01b80bb7d@mail.gmail.com>
	<21246.1249491592@sss.pgh.pa.us>

On Wednesday 05 August 2009 19:59:52 Tom Lane wrote:
> Or maybe we are going at this the wrong way?  Would it be better to try
> harder to support the write-a-plpgsql-function approach?

This would become much simpler if you could just execute plpgsql code instead 
of having to define a function around it.  And perhaps if the plpgsql parser 
where a bit smarter.

Example:

RUN LANGUAGE plpgsql $$
FOR schema_name, table_name FROM information_schema.tables WHERE whatever LOOP
    GRANT ALL ON TABLE schema_name.table_name TO someuser;
END LOOP $$;




view thread (83+ messages)  latest in thread

Message-ID: <200908101042.35024.peter_e@gmx.net>
Permalink:  ../200908101042.35024.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200908101042.35024.peter_e@gmx.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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter_e@gmx.net, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, sfrost@snowman.net, nikhil.sontakke@enterprisedb.com, pjmodos@pjmodos.net
  Subject: Re: GRANT ON ALL IN schema
  In-Reply-To: <200908101042.35024.peter_e@gmx.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