Re: GRANT ON ALL IN schema

From: Richard Huxton <dev(at)archonet(dot)com>
To: decibel <decibel(at)decibel(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>, Petr Jelinek <pjmodos(at)pjmodos(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GRANT ON ALL IN schema
Date: 2009-08-07 06:57:42
Message-ID: 4A7BD066.3040109@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-08-07 07:24:45 Re: mixed, named notation support
Previous Message Heikki Linnakangas 2009-08-07 06:00:59 Re: pg_ctl stop -m fast after -m smart