Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 2F0229FA0CC for ; Fri, 1 Dec 2006 21:33:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 17949-08 for ; Fri, 1 Dec 2006 21:33:38 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 1DBB49F9F7B for ; Fri, 1 Dec 2006 21:33:42 -0400 (AST) Received: (qmail invoked by alias); 02 Dec 2006 01:33:41 -0000 Received: from dslb-084-063-031-254.pools.arcor-ip.net (EHLO colt.pezone.net) [84.63.31.254] by mail.gmx.net (mp001) with SMTP; 02 Dec 2006 02:33:41 +0100 X-Authenticated: #495269 From: Peter Eisentraut To: pgsql-admin@postgresql.org Subject: Re: PostgreSQL and Performance of Functions Date: Sat, 2 Dec 2006 02:33:38 +0100 User-Agent: KMail/1.9.5 Cc: "Aaron Bono" , "Rajesh Kumar Mallah" References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612020233.39653.peter_e@gmx.net> X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/16 X-Sequence-Number: 23808 Aaron Bono wrote: > I was told that, for DB2, stored procedures are a better choice for > parameterized views which is what I was trying to do with the > functions. Is the same true for PostgreSQL? That depends somewhat on the meaning of "better", but on average a view should be preferred if possible. It's easier to set up, easier to debug, and at least as efficient. -- Peter Eisentraut http://developer.postgresql.org/~petere/