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.
Jorge Godoy <jgodoy(at)gmail(dot)com>
In response to
pgsql-sql by date
|Next:||From: Peter Eisentraut||Date: 2006-05-08 21:23:54|
|Subject: Re: Postgres 8.1 sequences and 'CALL'-syntax|
|Previous:||From: Alvaro Herrera||Date: 2006-05-07 23:33:43|
|Subject: Re: Creating nested functions with plpgsql|