plpgsql out parameter with select into - Mailing list pgsql-sql

From Horváth Imre
Subject plpgsql out parameter with select into
Date
Msg-id 1282070709.3269.3.camel@cytherian.blemidon.dyndns.org
Whole thread Raw
Responses Re: plpgsql out parameter with select into  (Sergey Konoplev <gray.ru@gmail.com>)
List pgsql-sql
Hi!

My question is, how can I get the out parameter from a function with
SELECT INTO by name?
I mean:

create function testfunc1(OUT _status integer) returns integer as
$BODY$_status := 0;
$BODY$
language plpgsql;

create function testfunc2() as
declarestatus integer;
$BODY$select into status * from testfunc1();
$BODY$
language plpgsql;

create function testfunc3() as
declarestatus integer;
$BODY$select into status _status from testfunc1();
$BODY$
language plpgsql;

testfunc2 works, testfunc3 not.

Thanks in advance:
Imre Horvath



pgsql-sql by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: plpgsql out parameter with select into
Next
From: Sergey Konoplev
Date:
Subject: Re: plpgsql out parameter with select into