Re: GRANT ON ALL IN schema - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: GRANT ON ALL IN schema
Date
Msg-id 4A7BD066.3040109@archonet.com
Whole thread Raw
In response to Re: GRANT ON ALL IN schema  (decibel <decibel@decibel.org>)
List 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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pg_ctl stop -m fast after -m smart
Next
From: Pavel Stehule
Date:
Subject: Re: mixed, named notation support