Re: On delete cascade!

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
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-15 06:29:33
Message-ID: 20020115062933.GA27415@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message KH Lim 2002-01-15 06:39:54 Problem with the postgresql operator.
Previous Message Gurudutt 2002-01-15 04:45:40 Re: Resources - Regular Expressions