Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A74A4632C06 for ; Tue, 17 Aug 2010 15:45:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 49872-02 for ; Tue, 17 Aug 2010 18:45:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) by mail.postgresql.org (Postfix) with ESMTP id 78F08632BCF for ; Tue, 17 Aug 2010 15:45:18 -0300 (ADT) Received: by fxm13 with SMTP id 13so3678862fxm.19 for ; Tue, 17 Aug 2010 11:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:from:to :disposition-notification-to:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=WoOivf+dMsD++EmP9zoZACpzkA1RFn+NTA78YhdrIWQ=; b=sqYUgX/UtwvjWhvTs6MKBHs1AsFRpXT840k1O/CnZshvXBoiMAWjdKqgSLCoUM9L9i hX44TuCmZxnI/unkKzuvArK7rQwysc1iMXIGxcJ8NM6RO7tuqpfPwVW0XBMw2wI73IZl ZQ/kpMvo2sgozl6tPG9jin8aZ3rYTGVSNP/Ic= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:from:to:disposition-notification-to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=smJ7scQTLsjEOdZsRpdZZ6o9eoBrckLF/ENixsGNW7E3OheAgzv22wm7uwOmTOC+WP l5vuFf/0A4eB+0PluT1ZG5baHREwp68ryQAOsSEYJn2Ez6eqW92wgERF1KaUzhT/wTLP lRCRr3LmAJOkrlwCrZEzb2ak+tJc5EY7f6v04= Received: by 10.223.118.71 with SMTP id u7mr6948058faq.58.1282070712982; Tue, 17 Aug 2010 11:45:12 -0700 (PDT) Received: from [192.168.100.100] (94-21-31-235.pool.digikabel.hu [94.21.31.235]) by mx.google.com with ESMTPS id k15sm3150222fai.16.2010.08.17.11.45.10 (version=SSLv3 cipher=RC4-MD5); Tue, 17 Aug 2010 11:45:11 -0700 (PDT) Subject: plpgsql out parameter with select into From: =?ISO-8859-1?Q?Horv=E1th?= Imre To: pgsql-sql@postgresql.org Content-Type: text/plain; charset="UTF-8" Date: Tue, 17 Aug 2010 20:45:09 +0200 Message-ID: <1282070709.3269.3.camel@cytherian.blemidon.dyndns.org> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 (2.30.2-4.fc13) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201008/63 X-Sequence-Number: 34503 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