X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A065C3A4764 for ; Fri, 21 Jan 2005 11:41:28 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96938-05 for ; Fri, 21 Jan 2005 11:41:21 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 5B63E3A41E2 for ; Fri, 21 Jan 2005 11:41:21 +0000 (GMT) Received: (qmail-ldap/ctrl 1286 invoked from network); 21 Jan 2005 11:41:18 -0000 Received: from unknown (HELO jupiter.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 21 Jan 2005 11:41:18 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by jupiter.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j0LBfVs17237 for ; Fri, 21 Jan 2005 12:41:31 +0100 (MET) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id ; Fri, 21 Jan 2005 12:41:19 +0100 Message-ID: From: =?ISO-8859-1?Q?K=D6PFERL_Robert?= To: Cc: pgsql-sql@postgresql.org Subject: returning a record from PL/pgSQL Date: Fri, 21 Jan 2005 12:41:09 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="ISO-8859-1" X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200501/186 X-Sequence-Number: 19974 I just tried hard to return a single record fromout a plpgsql-function. While the (otherwise excelent) documentation didn't give me an answer, I found out that this works: select into ret false, balance, balance; return ret; while ret is a composite type. This construction however tastes not good to me. Is there a nicer way? An example for PL/pgSQL which returns not just a scalar but also a composite type should be added to the documentation. i.e. as second part of the RETURN statement.