From: Jorge Godoy <jgodoy@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Creating nested functions with plpgsql
Date: Sun, 7 May 2006 20:46:04 -0300
Message-ID: <200605072046.05629.jgodoy@gmail.com> (raw)
In-Reply-To: <20060507233343.GC31301@surnet.cl>
References: <200605021414.49661.jgodoy@gmail.com>
<20060507233343.GC31301@surnet.cl>
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>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jgodoy@gmail.com
Subject: Re: Creating nested functions with plpgsql
In-Reply-To: <200605072046.05629.jgodoy@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox