X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 79A6ED1E83D for ; Tue, 20 Jan 2004 16:16:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 60137-06 for ; Tue, 20 Jan 2004 12:15:35 -0400 (AST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by svr1.postgresql.org (Postfix) with ESMTP id 77EC8D1D500 for ; Tue, 20 Jan 2004 12:15:34 -0400 (AST) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AiyXM-00082M-00 for ; Tue, 20 Jan 2004 17:15:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AiyXL-00082E-00 for ; Tue, 20 Jan 2004 17:15:31 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AiyXL-00020e-00 for ; Tue, 20 Jan 2004 17:15:31 +0100 From: Harald Fuchs Subject: Re: Trigger question Date: 20 Jan 2004 17:15:31 +0100 Organization: Linux Private Site Lines: 24 Message-ID: References: <400691EA.96598C34@t1.unisoftbg.com> <871xpvij42.fsf@mailbox.samurai.com> <200401200813.57147.dev@archonet.com> <24300.1074614549@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Complaints-To: usenet@sea.gmane.org X-No-Archive: yes User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/198 X-Sequence-Number: 5372 In article <24300.1074614549@sss.pgh.pa.us>, Tom Lane writes: > Richard Huxton writes: >> On Tuesday 20 January 2004 00:01, Neil Conway wrote: >>> Yeah, I didn't get around to implementing that. If anyone wants this >>> feature, I'd encourage them to step up to the plate -- I'm not sure >>> when I'll get the opportunity/motivation to implement this myself. >> I didn't think they'd be meaningful for a statement-level trigger. Surely >> OLD/NEW are by definition row-level details. > According to the complainants, OLD/NEW are commonly available as > recordsets (tables) inside a statement trigger. Yes. > I'm not very clear on > how that works myself --- in particular, one would think it important to > be able to work with corresponding pairs of OLD and NEW rows, which > would be painful with a table-like abstraction. Why? If the underlying table has a primary key, finding corresponding pairs is trivial; if there isn't, it's impossible.