X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5500AD6D07 for ; Wed, 23 Nov 2005 01:13:22 -0400 (AST) 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 81019-04 for ; Wed, 23 Nov 2005 05:13:20 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 95940D7E05 for ; Wed, 23 Nov 2005 01:13:19 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id jAN5DEpb057022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Nov 2005 22:13:16 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id jAN5DEXd049202; Tue, 22 Nov 2005 22:13:14 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id jAN5DE0t049201; Tue, 22 Nov 2005 22:13:14 -0700 (MST) (envelope-from mfuhr) Date: Tue, 22 Nov 2005 22:13:14 -0700 From: Michael Fuhr To: Yves Vindevogel Cc: pgsql-performance@postgresql.org Subject: Re: Stored Procedure Message-ID: <20051123051314.GB49008@winnie.fuhr.org> References: <20051122185941.GA18102@winnie.fuhr.org> <06612338d301f531643d479a819e4632@implements.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06612338d301f531643d479a819e4632@implements.be> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/469 X-Sequence-Number: 15726 On Tue, Nov 22, 2005 at 11:20:09PM +0100, Yves Vindevogel wrote: > 8.1, hmm, that's brand new. Yes, but give it a try, at least in a test environment. The more people use it, the more we'll find out if it has any problems. > But, still, it's quite some coding for a complete recordset, not ? How so? The examples I posted are almost identical to how you'd return a composite type created with CREATE TYPE or SETOF that type, except that you declare the return columns as INOUT or OUT parameters and you no longer have to create a separate type. If you're referring to how I wrote two sets of assignments and RETURN NEXT statements, you don't have to do it that way: you can use a loop, just as you would with any other set-returning function. -- Michael Fuhr