Re: GRANT ON ALL IN schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: 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-21 14:26:50
Message-ID: 3493.1250864810@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Petr Jelinek wrote:
>> The implementation as I see it would create function in pg_temp
>> namespace, call it and then drop it. Any other implementation would
>> imho mean rewriting procedure language api.

> That's really ugly. It'll cause catalog bloat with every execution.
> I think it would be acceptable to have a new column in pg_language that
> pointed to an anonymous block execute function. Languages that do not
> define this function cannot use this new feature.

+1. The other way would also (presumably) mean invoking the language's
validate procedure, which might well be redundant and in any case would
probably not have exactly the error-reporting behavior one would want.
I think it's better if the language knows it's dealing with an anonymous
block. You could even imagine the language relaxing its rules a bit,
for instance not requiring an outer BEGIN/END in plpgsql.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-21 14:41:06 Re: Geometric Elimination
Previous Message Tom Lane 2009-08-21 14:18:51 Re: XLogFlush