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 BC778DABC2 for ; Sun, 23 Oct 2005 21:29:46 -0300 (ADT) 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 10836-09 for ; Mon, 24 Oct 2005 00:29:41 +0000 (GMT) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by svr1.postgresql.org (Postfix) with ESMTP id F0F01DABDC for ; Sun, 23 Oct 2005 21:29:42 -0300 (ADT) Received: (qmail 7173 invoked from network); 24 Oct 2005 00:29:46 -0000 Received: from dsl017-073-250.chi4.dsl.speakeasy.net (HELO mofo.meme.com) ([69.17.73.250]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 24 Oct 2005 00:29:46 -0000 Received: from mofo (localhost.localdomain [127.0.0.1]) by mofo.meme.com (Postfix) with ESMTP id 77BCD6E422; Sun, 23 Oct 2005 19:40:18 -0500 (CDT) Date: Mon, 24 Oct 2005 00:40:18 +0000 From: "Karl O. Pinc" Subject: Re: Using LIMIT 1 in plpgsql PERFORM statements To: Josh Berkus Cc: pgsql-performance@postgresql.org References: <1129957521l.27845l.2l@mofo> <200510231402.35612.josh@agliodbs.com> In-Reply-To: <200510231402.35612.josh@agliodbs.com> (from josh@agliodbs.com on Sun Oct 23 16:02:35 2005) X-Mailer: Balsa 2.3.0 Message-Id: <1130114418l.8670l.2l@mofo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[AWL=-0.000, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/324 X-Sequence-Number: 15092 On 10/23/2005 04:02:35 PM, Josh Berkus wrote: > I'm wondering in what context it makes sense to call PERFORM on a > constant. I like to write PERFORMs that return a constant when selecting from a table. It emphasizes that the selection is being done for its side effects. (Programs should be written for people to read and only incidentally for computers to execute. Programs that people can't read quickly become useless whereas programs that can't run quickly can be fixed. Computers are easy. People are difficult.) Karl Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein