Received: from mta01-svc.ntlworld.com (mta01-svc.ntlworld.com [62.253.162.41]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0FBXIV36084 for ; Tue, 15 Jan 2002 06:33:18 -0500 (EST) (envelope-from boylesa@roselink.co.uk) Received: from dualtower ([213.105.88.197]) by mta01-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20020115113320.YDEV9422.mta01-svc.ntlworld.com@dualtower>; Tue, 15 Jan 2002 11:33:20 +0000 Message-ID: <009901c19db8$5d781a60$c55869d5@dualtower> From: "Steve Boyle \(Roselink\)" To: "Roberto Mello" , "Paulo J. Matos" Cc: References: <87zo3gfzdj.fsf@localhost.localdomain> <20020115062933.GA27415@cc.usu.edu> Subject: Re: On delete cascade! Date: Tue, 15 Jan 2002 11:32:50 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200201/163 X-Sequence-Number: 6249 Is the , after socio the problem here? sb ----- Original Message ----- From: "Roberto Mello" To: "Paulo J. Matos" Cc: Sent: Tuesday, January 15, 2002 6:29 AM Subject: Re: [SQL] On delete cascade! > On Mon, Jan 14, 2002 at 08:31:36PM +0000, Paulo J. Matos wrote: > > Hi all, > > > > 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); > > Ola Paulo, > > You need to take a look at the PostgreSQL documentation as well. Just > reading your college databases book won't cut it most of the time. > > PostgreSQL has excellent documentation, especially the reference manual. > Take a look at it. So far both of your questions could have been answered > by taking a quick glance at the docs. > > http://www.postgresql.org/idocs/ > > -Roberto > > -- > +----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+ > Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ > http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer > Information is the greatest weapon of power to the modern wizard. > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >