Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5E046633996 for ; Mon, 27 Apr 2009 16:37:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 85857-10 for ; Mon, 27 Apr 2009 16:37:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail47.e.nsc.no (mail47.e.nsc.no [193.213.115.47]) by mail.postgresql.org (Postfix) with ESMTP id 4307463381D for ; Mon, 27 Apr 2009 16:37:51 -0300 (ADT) Received: from [192.168.0.15] (062016185042.customer.alfanett.no [62.16.185.42]) (authenticated bits=0) by mail47.nsc.no (8.13.8/8.13.5) with ESMTP id n3RJbmJ6005755 for ; Mon, 27 Apr 2009 21:37:49 +0200 (MEST) From: "Leif B. Kristensen" To: pgsql-sql@postgresql.org Subject: Re: Multiple return values and assignment Date: Mon, 27 Apr 2009 21:37:47 +0200 User-Agent: KMail/1.9.9 References: <200904251306.44880.leif@solumslekt.org> In-Reply-To: X-Face: %iea8o"[SI'kMDS.`hz7lU=?\^lC9J-]CVjo; f{4-C:$?uVUEjyN~uYFn%*aH_c3d09U>=?utf-8?q?x=0A=09TXtaoj=7EMV=2E8PgG7hik9=3BcCT2N6+u?=@Y{wH\p3*_f~FH9k,Wi74e[_l%.7b^'zJ)8S'^G<(=?utf-8?q?=3D=0A=09zw8=5CPMC3=27=7BKl9=2EzL*ks!b6wA?=,c~'F`k&Vq|ELDGa|4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/130 X-Sequence-Number: 32476 On Monday 27. April 2009, Jasen Betts wrote: >SELECT * FROM get_sort(par_id, srt, txt) INTO srt,txt; Thank you very much! That saved me from one composite variable declaration and two superfluous lines of code. I've settled for SELECT number, string FROM get_sort(par_id, srt, txt) INTO srt, txt; as that seems a little tidier. I probably should have thought of it myself, but I wrongly assumed that it was impossible to do multiple assignments like this in plpgsql. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/