Re: Creating nested functions with plpgsql

Поиск
Список
Период
Сортировка
От Jorge Godoy
Тема Re: Creating nested functions with plpgsql
Дата
Msg-id 200605072046.05629.jgodoy@gmail.com
обсуждение исходный текст
Ответ на Re: Creating nested functions with plpgsql  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-sql
Em Domingo 07 Maio 2006 20:33, Alvaro Herrera escreveu:
>
> We don't support nested functions at present, but you can create a
> separate function and invoke it as you would call any external function.

Yeah, I know it and that's how I use some things today, but even so, having 
nested functions help to write some kinds of code.

> This is arguably better, because you may then use inner_function in any
> "outer function", not just the current one.

It depends.  There are cases where it is better -- at least for legibility -- 
to have nested functions.  Having a procedural approach is not always the 
best algorithm, but, as I said, it solves almost all problems.


Thanks,
-- 
Jorge Godoy      <jgodoy@gmail.com>



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Creating nested functions with plpgsql
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Postgres 8.1 sequences and 'CALL'-syntax