Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0ENr8V90191 for ; Mon, 14 Jan 2002 18:53:08 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id CC5A9D5F6; Mon, 14 Jan 2002 15:53:10 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id C00515BF4; Mon, 14 Jan 2002 15:53:10 -0800 (PST) Date: Mon, 14 Jan 2002 15:53:10 -0800 (PST) From: Stephan Szabo To: "Paulo J. Matos" Cc: Subject: Re: On delete cascade! In-Reply-To: <87zo3gfzdj.fsf@localhost.localdomain> Message-ID: <20020114155126.J27862-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200201/154 X-Sequence-Number: 6240 On 14 Jan 2002, Paulo J. Matos wrote: > On weak entities I've used ON DELETE CASCADE as mentioned in > "Databases Management Systems" by Raghu Ramakrishnan. But I get: > psql:tables.sql:43: ERROR: parser: parse error at or near "ON" > > on tables like the following: > > CREATE TABLE socio_ilumindado ( > cognome varchar, > id integer, > nome varchar, > alcunha varchar, > data_filiacao date, > PRIMARY KEY(id), > FOREIGN KEY(id, nome, alcunha, data_filiacao) REFERENCES socio, > ON DELETE CASCADE); > > > How can I change this to be compatible with postgresql? We don't want the comma between socio and the ON DELETE CASCADE (which as far as I can see isn't allowed in the SQL92 spec either, but I may be missing it).