From: Imre Horvath <blemidon@gmail.com>
To: Sergey Konoplev <gray.ru@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: plpgsql out parameter with select into
Date: Wed, 18 Aug 2010 17:00:17 +0200
Message-ID: <1282143617.2734.2.camel@cytherian.blemidon.dyndns.org> (raw)
In-Reply-To: <AANLkTi=YT1cYTeu0JbN_0ZYBjN-jyrA6fpRDuQcX95xN@mail.gmail.com>
References: <1282070709.3269.3.camel@cytherian.blemidon.dyndns.org>
<AANLkTi=YT1cYTeu0JbN_0ZYBjN-jyrA6fpRDuQcX95xN@mail.gmail.com>
It don't work...
Only select into status * from... works.
Imre Horvath
2010. 08. 18, szerda keltezéssel 09.42-kor Sergey Konoplev ezt írta:
> 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
> >
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: blemidon@gmail.com, gray.ru@gmail.com
Subject: Re: plpgsql out parameter with select into
In-Reply-To: <1282143617.2734.2.camel@cytherian.blemidon.dyndns.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox