cascade problems

Поиск
Список
Период
Сортировка
От Michael Zouroudis
Тема cascade problems
Дата
Msg-id 3D8A07BC.2030203@idealcorp.com
обсуждение исходный текст
Ответы Re: cascade problems  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
for those who can help,

on my database i have two tables, organization and transaction, listed here;
-------------------------------------
create table organization(
organ_person_id          serial             primary key,
asset_id                       int,
fname                          text,
lname                          text,
phone                           varchar(15),
email                          varchar(20),
constraint organization_asset_id_fk foreign key(asset_id) references assets(asset_id));

create table transaction(
transaction_id                 serial           primary key,
trans_date                        timestamp   default  current_timestamp,
return_date                       timestamp,
organ_person_id               int,
constraint transaction_organ_person_id_fk foreign key(organ_person_id) references organization(organ_person_id) on delete cascade );
---------------------------------
what i want is for a delete on transaction to make a delete on organization where the organ_person_id s match up,with a query like;

delete from transaction where organ_person_id = 15;

 but this is not happening.  all it does is delete from transaction, and doesn't touch organization.  am i doing something wrong?  

please help,

mike z



--
Mike Zouroudis
Intern
__________________________________________________
I.D.E.A.L. Technology Corporation - Orlando Office
http://www.idealcorp.com - 407.999.9870 x14

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

Предыдущее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: killing process question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: killing process question