Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5F45A47639D for ; Wed, 27 Nov 2002 11:21:07 -0500 (EST) Received: from www.fred.com (AMarseille-201-2-1-9.abo.wanadoo.fr [193.252.63.9]) by postgresql.org (Postfix) with SMTP id E03F64764D2 for ; Wed, 27 Nov 2002 11:19:04 -0500 (EST) Received: (qmail 9210 invoked from network); 27 Nov 2002 16:18:08 -0000 Received: from fred.com (HELO there) (192.168.0.125) by 0 with SMTP; 27 Nov 2002 16:18:08 -0000 Content-Type: text/plain; charset="iso-8859-15" From: fred To: pgsql-admin@postgresql.org Subject: CASCADE PB Date: Wed, 27 Nov 2002 17:18:08 +0100 X-Mailer: KMail [version 1.3.1] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20021127161904.E03F64764D2@postgresql.org> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/281 X-Sequence-Number: 6469 Hello, I use postgreSQL 7.2.3 and I have trouble on deleting. I would like to automaticly delete line in the 'coop' table when I dlete the line in the 'fact' table but it is not ok. Where is my mistake ? This is my database: create table coop ( id_coop serial not null, nom_coop varchar(50) not null, primary key(id_coop) ); create table fact ( id_fact serial not null, id_coop integer references coop(id_coop) on delete cascade, date_fact timestamp not null, montant_fact decimal(6,3), primary key(id_fact) ); Thank's for your support.