From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Owen Jacobson" <ojacobson(at)osl(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: OUT parameter |
Date: | 2006-03-23 02:47:31 |
Message-ID: | 27322.1143082051@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> Daniel Caune wrote:
>> Is there any suggestion against using OUT parameter for local
>> calculation such as using a local variable?
In plpgsql (at least in the current implementation) an OUT parameter is
pretty much just a local variable, and so there's no efficiency argument
against using it as a temporary. Whether you consider this good style
is a matter of opinion.
"Owen Jacobson" <ojacobson(at)osl(dot)com> writes:
> I'd say there's no problem with this, PROVIDED you can ensure you'll
> never abort before completing the computation.
Not really an issue in Postgres: we do not support pass-by-reference
parameters and are unlikely to start doing so. There isn't any way
that you can affect locals of a calling procedure before you return.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-23 04:27:11 | Re: [SQL] Function Parameters in GROUP BY clause cause errors |
Previous Message | Christian Paul B. Cosinas | 2006-03-23 01:33:33 | Re: Function Parameters in GROUP BY clause cause errors |