From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | "Paulo J(dot) Matos" <pocm(at)rnl(dot)ist(dot)utl(dot)pt> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: On delete cascade! |
Date: | 2002-01-14 23:53:10 |
Message-ID: | 20020114155126.J27862-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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).
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2002-01-15 01:01:40 | Re: nested inner join help |
Previous Message | Tom Lane | 2002-01-14 23:25:37 | Re: nested inner join help |