pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Imre Horvath <blemidon@gmail.com>
To: pgsql-sql@postgresql.org
Subject: plpgsql out parameter with select into
Date: Tue, 17 Aug 2010 20:46:04 +0200
Message-ID: <1282070764.3269.4.camel@cytherian.blemidon.dyndns.org> (raw)

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




view thread (9+ messages)  latest in thread

Message-ID: <1282070764.3269.4.camel@cytherian.blemidon.dyndns.org>
Permalink:  ../1282070764.3269.4.camel@cytherian.blemidon.dyndns.org/
Also on:    postgresql.org/message-id/1282070764.3269.4.camel@cytherian.blemidon.dyndns.org

 · 

reply

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
  Subject: Re: plpgsql out parameter with select into
  In-Reply-To: <1282070764.3269.4.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