plpgsql out parameter with select into

From: Imre Horvath <blemidon(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: plpgsql out parameter with select into
Date: 2010-08-17 18:46:04
Message-ID: 1282070764.3269.4.camel@cytherian.blemidon.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
declare
status integer;
$BODY$
select into status * from testfunc1();
$BODY$
language plpgsql;

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

testfunc2 works, testfunc3 not.

Thanks in advance:
Imre Horvath

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Koczan 2010-08-17 21:06:39 Re: Domains, casts, and MS Access
Previous Message Horváth Imre 2010-08-17 18:45:09 plpgsql out parameter with select into