Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> David E. Wheeler wrote:
>> Very excited about the new `DO` command in 8.5a2. I read through the
>> patch review thread and found that, like me, Dim had expected it to
>> behave more like a lambda than a simple command.
> It was discussed and rejected, at least for now. See earlier discussion.
A lambda facility would require being able to pass arguments and return
results, which we intentionally left out of DO to keep it simple. By
the time you add all that notation, it's far from clear that you
shouldn't just define a function.
Also, DO is (intended to be) optimized for execute-once behavior.
A lambda block inside a query shouldn't assume that. So it would not be
the same facility from either a syntax or an implementation standpoint.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Josh Berkus||Date: 2009-10-26 20:30:00|
|Subject: Re: Proposal: String key space for advisory locks|
|Previous:||From: Pavel Stehule||Date: 2009-10-26 20:16:25|
|Subject: Re: Anonymous Code Blocks as Lambdas?|