pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Paulo J. Matos <pocm@rnl.ist.utl.pt>
Cc: pgsql-sql@postgresql.org
Subject: Re: On delete cascade!
Date: Mon, 14 Jan 2002 15:53:10 -0800 (PST)
Message-ID: <20020114155126.J27862-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <87zo3gfzdj.fsf@localhost.localdomain>


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




view thread (10+ messages)  latest in thread

Message-ID: <20020114155126.J27862-100000@megazone23.bigpanda.com>
Permalink:  ../20020114155126.J27862-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020114155126.J27862-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, pocm@rnl.ist.utl.pt
  Subject: Re: On delete cascade!
  In-Reply-To: <20020114155126.J27862-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox