Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id CBB6E632915 for ; Wed, 18 Aug 2010 12:00:30 -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 55896-07 for ; Wed, 18 Aug 2010 15:00:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id 91A246327D4 for ; Wed, 18 Aug 2010 12:00:23 -0300 (ADT) Received: by bwz11 with SMTP id 11so270769bwz.19 for ; Wed, 18 Aug 2010 08:00:22 -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:cc :in-reply-to:references:disposition-notification-to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=x2LYBimSeTZiOMy6RdMKQInLvvaInXH57fM4FhzyKY4=; b=BHLFyJ2hSKqBSS4G7FeXZjUHUxSG1JmAaLeepac1COG5HQFGr6rrhxseX/MjsTEfPD ehLQYh7PcQrQrce7mVAmBb4i5Ke0qqZ7GbwCz26zGXSPVBwuT3RAL2GXn+B0u5v61frs pU6hf2EXYN2T2r+aUY1BtWHW2jrvTMmgfWrUc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references :disposition-notification-to:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=KsnncEj51CW3Gw3ij1APZbRtMv+zLIDMFNYoWiyHDm2hwIs6Iuk6b8vdplGFsRkUle CP5olw/kT19XvG8hPD5ru5BKaJwv0BdhxkSrp8XDbDEB/D/CjZukNzsvumUNj/tNv9u/ aDzYsjSSijCivjk1cV9QqbU6IVySdPm87cveA= Received: by 10.204.138.145 with SMTP id a17mr5547004bku.82.1282143622537; Wed, 18 Aug 2010 08:00:22 -0700 (PDT) Received: from [84.224.165.191] (netacc-gpn-4-165-191.pool.telenor.hu [84.224.165.191]) by mx.google.com with ESMTPS id d27sm263926bku.22.2010.08.18.08.00.20 (version=SSLv3 cipher=RC4-MD5); Wed, 18 Aug 2010 08:00:21 -0700 (PDT) Subject: Re: plpgsql out parameter with select into From: Imre Horvath To: Sergey Konoplev Cc: pgsql-sql@postgresql.org In-Reply-To: References: <1282070709.3269.3.camel@cytherian.blemidon.dyndns.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 18 Aug 2010 17:00:17 +0200 Message-ID: <1282143617.2734.2.camel@cytherian.blemidon.dyndns.org> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 (2.30.2-4.fc13) Content-Transfer-Encoding: 8bit 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/67 X-Sequence-Number: 34507 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 : > > 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 > > > > >