No promany key in parent table, how to use delete cascade?

From: "Zhidian Du" <duzhidian(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: No promany key in parent table, how to use delete cascade?
Date: 2002-11-08 06:19:09
Message-ID: F1364A2DreBBsQwY6YH00000812@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear All,

I want to dreate a delete cascade in children tables. The primary key of
parent table is oid, so when I create parent table, there is no apparetly
key word "primary key". The problem jumps out.

When I create child table using columnn constraint on delete, the SQL says:

"PRIMARY KEY for referenced table "parent" not found"

I do not need to specify the primary key since I am using oid. How can I
get around this problem?

Thanks.

Zhidian Du

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-11-08 06:49:34 Re: No promany key in parent table, how to use delete cascade?
Previous Message Zhidian Du 2002-11-08 05:36:55 Delete cascade for multi tables?