pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: decibel <decibel@decibel.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>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: GRANT ON ALL IN schema
Date: Fri, 07 Aug 2009 07:57:42 +0100
Message-ID: <4A7BD066.3040109@archonet.com> (raw)
In-Reply-To: <60269721-937B-477F-BC5E-B71BA453E452@decibel.org>
References: <4A37BF63.50008@pjmodos.net>
	<4A38A956.8080600@pjmodos.net>
	<4A4DE104.8090605@pjmodos.net>
	<a301bfd90907170254re7dd52es9fedb007376d8055@mail.gmail.com>
	<4A6059B4.5010004@pjmodos.net>
	<4A607997.3030305@pjmodos.net>
	<603c8f070907191628r6929055coe7627726a33ed143@mail.gmail.com>
	<a301bfd90907192312s17e1b16cy3bcd6e0876960c04@mail.gmail.com>
	<603c8f070908050932m19e7db65u9dab6d8001c5a237@mail.gmail.com>
	<20810.1249490458@sss.pgh.pa.us>
	<603c8f070908050951s3e5df452se4c610f01b80bb7d@mail.gmail.com>
	<21246.1249491592@sss.pgh.pa.us>
	<60269721-937B-477F-BC5E-B71BA453E452@decibel.org>

decibel wrote:
> In this specific case, I think there's enough demand to warrant a 
> built-in mechanism for granting, but if something like exec() is 
> built-in then the bar isn't as high for what the built-in GRANT 
> mechanism needs to handle.
> 
> CREATE OR REPLACE FUNCTION tools.exec(
>     sql text
>     , echo boolean
> ) RETURNS text LANGUAGE plpgsql AS $exec$

Perhaps another two functions too:

list_all(objtype, schema_pattern, name_pattern)
exec_for(objtype, schema_pattern, name_pattern, sql_with_markers)

Obviously the third is a simple wrapper around the first two.

-- 
   Richard Huxton
   Archonet Ltd



view thread (83+ messages)  latest in thread

Message-ID: <4A7BD066.3040109@archonet.com>
Permalink:  ../4A7BD066.3040109@archonet.com/
Also on:    postgresql.org/message-id/4A7BD066.3040109@archonet.com

 · 

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: dev@archonet.com, decibel@decibel.org, 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: <4A7BD066.3040109@archonet.com>

* 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