On Oct 26, 2009, at 1:21 PM, Tom Lane wrote:
> 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.
Well sometimes I want to do something like that as an expression,
rather than having to write a separate statement that declares 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.
Perhaps lambda isn't the proper term.
Best,
David