Re: GRANT ON ALL IN schema

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Sam Mason <sam(at)samason(dot)me(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GRANT ON ALL IN schema
Date: 2009-08-16 03:51:31
Message-ID: 603c8f070908152051mbd1d706hb0e29f5cfaf2f151@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 15, 2009 at 7:15 PM, Peter Eisentraut<peter_e(at)gmx(dot)net> wrote:
> On lör, 2009-08-15 at 23:31 +0100, Sam Mason wrote:
>> On Sat, Aug 15, 2009 at 11:34:04PM +0200, Dimitri Fontaine wrote:
>> > Nitpicking dept, I think I prefer:
>> >
>> >  DO [ [LANGUAGE] language] $$ ... $$;
>> >  DO plperl $$ ... $$;
>> >  DO language plpython $$ ... $$;
>> >
>> > language is optional and defaults to plpgsql.
>>
>> Yup, sounds nicer.  The less globals the better!
>>
>> Next all you need is to be able to PREPARE them (and somehow access the
>> parameters from execute) and you'll have nice local functions. :)
>
> Yeah, rather than just making up some new command for "execute this
> string", this could be generalized as lambda expressions that could be
> called whereever an expression is allowed.  E.g.
>
> SELECT LAMBDA $$ ... $$;
>
> -- if CALL is implemented
> CALL LAMBDA $$ ... $$;
>
> PREPARE foo AS SELECT LAMBDA $$ ... $$;
> EXECUTE foo;
>
> SELECT (LAMBDA (x int, y text) $$ ... $$) (37, 'foo');

I like this idea (although it might not be too easy to implement, not
sure), but I think we could still use DO (which is shorter) for the
verb. Lambda-calculus is cool, but "do" is nice and simple.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-08-16 04:04:27 Re: GRANT ON ALL IN schema
Previous Message Sam Mason 2009-08-16 01:48:19 Re: GRANT ON ALL IN schema