Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 7EAF49FB2E6 for ; Wed, 18 Oct 2006 19:45:04 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 28770-09 for ; Wed, 18 Oct 2006 22:44:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 6F7369FA1E2 for ; Wed, 18 Oct 2006 19:44:58 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 450CA56456; Wed, 18 Oct 2006 17:44:57 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 18 Oct 2006 17:44:53 -0500 Date: Wed, 18 Oct 2006 17:44:53 -0500 From: "Jim C. Nasby" To: Marc McIntyre Cc: Jean-Christophe Roux , pgsql-php@postgresql.org Subject: Re: plpgsql returning array Message-ID: <20061018224453.GF56874@nasby.net> References: <20061014202841.17630.qmail@web35304.mail.mud.yahoo.com> <4531D112.90301@squiz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4531D112.90301@squiz.net> X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:061018:mmcintyre@squiz.net::UnRVWaLne32zGtnJ:000000000000000000 0000000000000000000000003RQC X-Hashcash: 1:20:061018:jcxxr@yahoo.com::tdkQpwMQj8ejETJb:000Tll X-Hashcash: 1:20:061018:pgsql-php@postgresql.org::jHjpW5lISJyizlzJ:0000000000000 000000000000000000000000Bncc X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/17 X-Sequence-Number: 3617 On Sun, Oct 15, 2006 at 04:11:30PM +1000, Marc McIntyre wrote: > You should use a set returning function. Your function can be rewritten > as a set returning function like so: Isn't there a way to return an array? SRFs are great, but not always the best tool. BTW, neither function should be marked as VOLATILE... they're actually IMMUTABLE as written. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)