pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Petr Jelinek <pjmodos@pjmodos.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: GRANT ON ALL IN schema
Date: Fri, 21 Aug 2009 10:26:50 -0400
Message-ID: <3493.1250864810@sss.pgh.pa.us> (raw)
In-Reply-To: <20090820190604.GK6261@alvh.no-ip.org>
References: <4A86B5D5.6060807@dunslane.net>
	<4A871F46.1040002@agliodbs.com>
	<5D5ECAE0-F2B0-479B-9594-50AAF18F10ED@hi-media.com>
	<20090815223102.GS5407@samason.me.uk>
	<1250378139.18992.6.camel@vanquo.pezone.net>
	<603c8f070908152051mbd1d706hb0e29f5cfaf2f151@mail.gmail.com>
	<4A87854B.3070707@dunslane.net>
	<1250427428.26280.2.camel@vanquo.pezone.net>
	<395.1250439160@sss.pgh.pa.us>
	<4A8D9CA0.1040607@pjmodos.net>
	<20090820190604.GK6261@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.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



view thread (83+ messages)  latest in thread

Message-ID: <3493.1250864810@sss.pgh.pa.us>
Permalink:  ../3493.1250864810@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3493.1250864810@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, pjmodos@pjmodos.net
  Subject: Re: GRANT ON ALL IN schema
  In-Reply-To: <3493.1250864810@sss.pgh.pa.us>

* 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