Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4B4E86323A3 for ; Wed, 18 Aug 2010 19:10:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 06002-07 for ; Wed, 18 Aug 2010 22:10:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 0E9EE6321D3 for ; Wed, 18 Aug 2010 19:10:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o7IM9wOF014561; Wed, 18 Aug 2010 18:09:58 -0400 (EDT) To: =?ISO-8859-1?Q?Horv=E1th_Imre?= cc: pgsql-sql@postgresql.org Subject: Re: plpgsql out parameter with select into In-reply-to: References: <1282070709.3269.3.camel@cytherian.blemidon.dyndns.org> <1282142717.2734.1.camel@cytherian.blemidon.dyndns.org> Comments: In-reply-to Sergey Konoplev message dated "Thu, 19 Aug 2010 01:58:14 +0400" Date: Wed, 18 Aug 2010 18:09:58 -0400 Message-ID: <14560.1282169398@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/69 X-Sequence-Number: 34509 > 2010/8/18 Horváth Imre : >> It don't work... A function returning a scalar type cannot control the column name assigned to the scalar in the calling query. To do that, you need to return a composite type, which means there need to be at least two OUT parameters if you're trying to do it via OUT-parameter names. regards, tom lane