Re: [SQL] OUT parameter

2006-03-23 Thread Daniel Caune
> > "Owen Jacobson" <[EMAIL PROTECTED]> 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 doin

Re: [SQL] OUT parameter

2006-03-23 Thread Owen Jacobson
Tom Lane wrote: > "Owen Jacobson" <[EMAIL PROTECTED]> 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

Re: [SQL] OUT parameter

2006-03-22 Thread Tom Lane
> 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

Re: [SQL] OUT parameter

2006-03-22 Thread Owen Jacobson
Daniel Caune wrote: > Is there any suggestion against using OUT parameter for local > calculation such as using a local variable? > > CREATE OR REPLACE FUNCTION foo(a IN int, >b1 OUT int, >b2 OUT int) > AS $$ > BEGIN > FOR (...) LO

[SQL] OUT parameter

2006-03-22 Thread Daniel Caune
Hi, Is there any suggestion against using OUT parameter for local calculation such as using a local variable? CREATE OR REPLACE FUNCTION foo(a IN int, b1 OUT int, b2 OUT int) AS $$ BEGIN FOR (...) LOOP b1 = (...); b2 = (...);