On delete cascade!

From: pocm(at)rnl(dot)ist(dot)utl(dot)pt (Paulo J(dot) Matos)
To: pgsql-sql(at)postgresql(dot)org
Subject: On delete cascade!
Date: 2002-01-14 20:31:36
Message-ID: 87zo3gfzdj.fsf@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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);

How can I change this to be compatible with postgresql?

TIA,
Best regards,

--
Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt
Instituto Superior Tecnico - Lisbon
Software & Computer Engineering - A.I.
- > http://www.rnl.ist.utl.pt/~pocm
---
Yes, God had a deadline...
So, He wrote it all in Lisp!

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-01-14 21:23:17 Re: CREATE TABLE glitch -fix request for 7.2
Previous Message Jan Wieck 2002-01-14 20:30:54 Re: Commercial: New Book!! PostgreSQL book is released into