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 5ED1C534C2 for ; Fri, 8 Apr 2005 16:50:52 +0100 (BST) 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 59268-02 for ; Fri, 8 Apr 2005 15:50:47 +0000 (GMT) Received: from smtp101.rog.mail.re2.yahoo.com (smtp101.rog.mail.re2.yahoo.com [206.190.36.79]) by svr1.postgresql.org (Postfix) with SMTP id 4B77852966 for ; Fri, 8 Apr 2005 16:50:46 +0100 (BST) Received: from unknown (HELO phlogiston.dydns.org) (a.sullivan@rogers.com@216.75.167.195 with login) by smtp101.rog.mail.re2.yahoo.com with SMTP; 8 Apr 2005 15:50:45 -0000 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id BE5323D2F; Fri, 8 Apr 2005 11:50:40 -0400 (EDT) Date: Fri, 8 Apr 2005 11:50:40 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Question on triggers and plpgsql Message-ID: <20050408155040.GC27718@phlogiston.dyndns.org> References: <4255AA15.8000508@mochima.com> <14244.1112970986@sss.pgh.pa.us> <20050408145928.GA27718@phlogiston.dyndns.org> <14740.1112974547@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14740.1112974547@sss.pgh.pa.us> User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/94 X-Sequence-Number: 20987 On Fri, Apr 08, 2005 at 11:35:47AM -0400, Tom Lane wrote: > What this does do for you is replace the risk of phantom emails (mail > sent but corresponding action inside the database never committed) > with the risk of duplicate emails (mail-sender sends you another one > after it restarts). In most cases I think I'd prefer the latter. Me too. Besides, you already have this risk with SMTP, because a message can be queued and accepted on the remote side when the local side goes away, so that the session is completed improperly. Depending on configuration and a bunch of painful start-up possibilities with the server, you might well get a duplicate copy of a mail transmitted later. (In the present age, given the remarkable quality of networks and mail servers everyone has, you almost never have this happen any more. But it's still strictly speaking possible.) A -- Andrew Sullivan | ajs@crankycanuck.ca The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun