X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E3E533A447A for ; Wed, 19 Jan 2005 21:35:31 +0000 (GMT) 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 73335-02 for ; Wed, 19 Jan 2005 21:35:24 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 61D123A4410 for ; Wed, 19 Jan 2005 21:35:25 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j0JLZMi5005610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Jan 2005 14:35:24 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j0JLZMgI096048; Wed, 19 Jan 2005 14:35:22 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j0JLZLY6096047; Wed, 19 Jan 2005 14:35:21 -0700 (MST) (envelope-from mfuhr) Date: Wed, 19 Jan 2005 14:35:21 -0700 From: Michael Fuhr To: =?iso-8859-1?Q?K=D6PFERL?= Robert Cc: pgsql-sql@postgresql.org Subject: Re: Returning a bool on DELETE in a proc. Message-ID: <20050119213521.GA95945@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/153 X-Sequence-Number: 19941 On Wed, Jan 19, 2005 at 06:09:16PM +0100, KÖPFERL Robert wrote: > > > > Why SQL instead of PL/pgSQL if the former doesn't do what you need > > and the latter does? > > I have the feeling that even complicated and boxed queries are faster or can > be optimized by the planer than any PLpgsql. Isn't there a motule that has > to be invoked? PL/pgSQL might be more efficient than you think -- see the Overview in the PL/pgSQL documentation for more information about how it works. I'd suggest making the function work first, and only then worry about whether it's fast enough. -- Michael Fuhr http://www.fuhr.org/~mfuhr/