Re: Anonymous Code Blocks as Lambdas?

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Anonymous Code Blocks as Lambdas?
Дата
Msg-id 69F6216B-D9AC-42B1-9795-987BDB890859@kineticode.com
обсуждение исходный текст
Ответ на Re: Anonymous Code Blocks as Lambdas?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Anonymous Code Blocks as Lambdas?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Parsing config files in a directory