Received: from neptun.sns-felb.debis.de (neptun.sns-felb.debis.de [53.122.101.2]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f27H0sx04006 for ; Wed, 7 Mar 2001 12:00:55 -0500 (EST) (envelope-from jens.hartwig@t-systems.de) Received: by neptun.sns-felb.debis.de; id SAA11968; Wed, 7 Mar 2001 18:00:09 +0100 Received: from unknown(53.113.82.10) by neptun.sns-felb.debis.de via smap (V5.0) id xma011933; Wed, 7 Mar 01 18:00:01 +0100 Received: from mail1.b3.dsh.de (localhost [127.0.0.1]) by dshmail1.dsh.de (8.9.1/8.8.7) with ESMTP id SAA19482; Wed, 7 Mar 2001 18:00:31 +0100 (MET) Received: from 0000864A433A ([138.201.10.193]) by mail1.b3.dsh.de (8.10.0/8.10.0) with SMTP id f27H0aX27870; Wed, 7 Mar 2001 18:00:36 +0100 From: "Jens Hartwig" To: "'Richard Huxton'" Cc: "'PSQL-Sql \(E-Mail\)'" Subject: AW: Problems with RULE Date: Wed, 7 Mar 2001 18:00:28 +0100 Message-ID: <001001c0a728$1cedf0a0$c10ac98a@0000864A433A> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <006701c0a6ec$3a60f7e0$1001a8c0@archonet.com> Importance: Normal X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200103/148 X-Sequence-Number: 1800 > [...] > So - if you issue "DELETE FROM t_xyz" you'd want two things to happen: > > 1. where deleted is false set it to true > 2. where deleted was true delete the record > > So - PG rewrites the query into two parts: > > DELETE FROM t_xyz WHERE old.deleted=false > DELETE FROM t_xyz WHERE NOT(old.deleted=false) > [...] Oooooh ... that's it! I hit my head against the wall :-) Thank you very much! Best regards, Jens Hartwig ----------------------------------------------------- T-Systems Projektleiter debis Systemhaus GEI GmbH Hausanschrift: Eichhornstraße 3, 10785 Berlin Postanschrift: 10785 Berlin Telefon: (004930) 25 54-32 82 Telefax: (004930) 25 54-31 87 Mobiltelefon: (0170) 167 26 48 E-Mail: jens.hartwig@t-systems.de Internet: http://www.t-systems.de