pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Sam Mason <sam@samason.me.uk>
Cc: pgsql-hackers@postgresql.org
Subject: Re: GRANT ON ALL IN schema
Date: Sat, 15 Aug 2009 23:51:31 -0400
Message-ID: <603c8f070908152051mbd1d706hb0e29f5cfaf2f151@mail.gmail.com> (raw)
In-Reply-To: <1250378139.18992.6.camel@vanquo.pezone.net>
References: <603c8f070908050951s3e5df452se4c610f01b80bb7d@mail.gmail.com>
	<4A7FE7F902000025000296E3@gw.wicourts.gov>
	<4A803A89.9020509@dunslane.net>
	<2CCE9C1D-919D-45D5-BFC2-C7723C45064E@hi-media.com>
	<162867790908150434j7aef36ecm202e81c4bb4740fa@mail.gmail.com>
	<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>

On Sat, Aug 15, 2009 at 7:15 PM, Peter Eisentraut<peter_e@gmx.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



view thread (83+ messages)  latest in thread

Message-ID: <603c8f070908152051mbd1d706hb0e29f5cfaf2f151@mail.gmail.com>
Permalink:  ../603c8f070908152051mbd1d706hb0e29f5cfaf2f151@mail.gmail.com/
Also on:    postgresql.org/message-id/603c8f070908152051mbd1d706hb0e29f5cfaf2f151@mail.gmail.com

 · 

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: robertmhaas@gmail.com, peter_e@gmx.net, sam@samason.me.uk
  Subject: Re: GRANT ON ALL IN schema
  In-Reply-To: <603c8f070908152051mbd1d706hb0e29f5cfaf2f151@mail.gmail.com>

* 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