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

Поиск
Список
Период
Сортировка
От Zhidian Du
Тема No promany key in parent table, how to use delete cascade?
Дата
Msg-id F1364A2DreBBsQwY6YH00000812@hotmail.com
обсуждение исходный текст
Ответы Re: No promany key in parent table, how to use delete cascade?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Zhidian Du"
Дата:
Сообщение: Delete cascade for multi tables?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: No promany key in parent table, how to use delete cascade?