Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4EF7A6324D6 for ; Tue, 17 Aug 2010 15:46:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 85539-05 for ; Tue, 17 Aug 2010 18:46:07 +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 2514163245F for ; Tue, 17 Aug 2010 15:46:07 -0300 (ADT) Received: by fxm13 with SMTP id 13so3679418fxm.19 for ; Tue, 17 Aug 2010 11:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to :disposition-notification-to:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=WoOivf+dMsD++EmP9zoZACpzkA1RFn+NTA78YhdrIWQ=; b=P1G7R9tHRBnmq+S8GLe4ZzQKShWUM37GiOxaMUmKXf2CUjldrxLBqhuQ10VVR0c6EF 9TEFSFv6ijWgpTXeRxQYsKVbjTQytZ4tup4WA8nTfMm3gnCaXETjWUDHrUqZ3sSBH4M7 kTOASgPLEcnBAENrsGExZz7kCOYI1lBXV5IL4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:disposition-notification-to:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=rAKrG2JkBB2i7KUA6bn1QDSbeqfhT0fm80ax1Zdi8aWCsUbveVoxY2kFIlDMQXJsyM JuKkh6e6qVphyhofp9ynLzX4Pl1wvhiYC9Spds4MMuMEXIlQIlqvzpqnaiIcjQOvvlcR 1u909/Yks3B8kBpmNwLdGj4dodwnTxtUtsT/4= Received: by 10.223.108.137 with SMTP id f9mr6999056fap.3.1282070766960; Tue, 17 Aug 2010 11:46:06 -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 b11sm3150445faq.30.2010.08.17.11.46.05 (version=SSLv3 cipher=RC4-MD5); Tue, 17 Aug 2010 11:46:06 -0700 (PDT) Subject: plpgsql out parameter with select into From: Imre Horvath To: pgsql-sql@postgresql.org Content-Type: text/plain; charset="UTF-8" Date: Tue, 17 Aug 2010 20:46:04 +0200 Message-ID: <1282070764.3269.4.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/56 X-Sequence-Number: 34496 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