Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id ECDD19FB20F for ; Thu, 19 Oct 2006 08:37:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 75255-09 for ; Thu, 19 Oct 2006 08:37:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [203.16.214.141]) by postgresql.org (Postfix) with ESMTP id A23179FB1FE for ; Thu, 19 Oct 2006 08:37:11 -0300 (ADT) Received: from ppp225-169.lns3.syd7.internode.on.net (HELO [192.168.0.4]) ([59.167.225.169]) by ipmail02.adl2.internode.on.net with ESMTP; 19 Oct 2006 21:07:08 +0930 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AQAAAIL/NkUN X-IronPort-AV: i="4.09,329,1157293800"; d="scan'208"; a="31759379:sNHT95026862" Message-ID: <45376362.40804@squiz.net> Date: Thu, 19 Oct 2006 21:37:06 +1000 From: Marc McIntyre User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: "Jim C. Nasby" CC: Jean-Christophe Roux , pgsql-php@postgresql.org Subject: Re: plpgsql returning array References: <20061014202841.17630.qmail@web35304.mail.mud.yahoo.com> <4531D112.90301@squiz.net> <20061018224453.GF56874@nasby.net> In-Reply-To: <20061018224453.GF56874@nasby.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.383 tagged_above=0 required=5 tests=SPF_HELO_PASS, SPF_SOFTFAIL X-Spam-Level: * X-Archive-Number: 200610/18 X-Sequence-Number: 3618 Jim C. Nasby wrote: > Isn't there a way to return an array? SRFs are great, but not always the > best tool. > > There's no way to nicely map an array from a plpgsql SF to a php array. (Ie. the driver won't do that for you, AFAIK) I find that array returning functions are useful when calling from other functions, and set returning functions are great when you wish to get a result set back to php.