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 D1570D1E862 for ; Tue, 20 Jan 2004 16:43:05 +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 68706-06 for ; Tue, 20 Jan 2004 12:42:33 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 664C6D1D320 for ; Tue, 20 Jan 2004 12:42:31 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0KGgUpH024606; Tue, 20 Jan 2004 11:42:31 -0500 (EST) To: Harald Fuchs Cc: pgsql-performance@postgresql.org Subject: Re: Trigger question In-reply-to: References: <400691EA.96598C34@t1.unisoftbg.com> <871xpvij42.fsf@mailbox.samurai.com> <200401200813.57147.dev@archonet.com> <24300.1074614549@sss.pgh.pa.us> Comments: In-reply-to Harald Fuchs message dated "20 Jan 2004 17:15:31 +0100" Date: Tue, 20 Jan 2004 11:42:30 -0500 Message-ID: <24605.1074616950@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/200 X-Sequence-Number: 5374 Harald Fuchs writes: > Tom Lane writes: >> 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. Exactly. Nonetheless, the correspondence exists --- the UPDATE definitely updated some particular row of the OLD set into some particular one of the NEW set. If the trigger API makes it impossible to reconstruct the matchup, the API is broken. Even if there is a primary key, the API should not force you to rely on that; what of an UPDATE that changes the primary key? regards, tom lane