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

From Sergey Konoplev
Subject Re: plpgsql out parameter with select into
Date
Msg-id AANLkTi=YT1cYTeu0JbN_0ZYBjN-jyrA6fpRDuQcX95xN@mail.gmail.com
Whole thread Raw
In response to plpgsql out parameter with select into  (Horváth Imre <horvath.imre@blemidon.hu>)
Responses Re: plpgsql out parameter with select into  (Horváth Imre <horvath.imre@blemidon.hu>)
Re: plpgsql out parameter with select into  (Imre Horvath <blemidon@gmail.com>)
List pgsql-sql
Hi,

SELECT column_name
INTO var_name
FROM ...

2010/8/17 Horváth Imre <horvath.imre@blemidon.hu>:
> 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
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>



--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray.ru@gmail.com / Skype: gray-hemp / ICQ: 29353802


pgsql-sql by date:

Previous
From: Horváth Imre
Date:
Subject: plpgsql out parameter with select into
Next
From: Sergey Konoplev
Date:
Subject: Re: Question about POSIX Regular Expressions performance on large dataset.