Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAGGdYm34555 for ; Fri, 16 Nov 2001 11:39:34 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.7) with HTTP id 507613; Fri, 16 Nov 2001 08:39:36 -0800 From: "Josh Berkus" Subject: Re: Question To: Andriy Pyrozhenko , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.7 Date: Fri, 16 Nov 2001 08:39:36 -0800 Message-ID: In-Reply-To: <945621152.20011116113830@vanjaonline.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200111/245 X-Sequence-Number: 5627 Andriy, > I have the rule for table > CREATE RULE del_jobs_del_activity AS ON DELETE TO jobs DO DELETE > FROM activities WHERE job_id = OLD.job_id; > > When i call: > DELETE FROM jobs WHERE job_id IN (SELECT DISTINCT job_id FROM > activities WHERE load_no = OLD.load_no) > This query does not delete the record from jobs but delete the > record by rule. And this is a problem because ... ? -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco