cascade problems - Mailing list pgsql-general

From Michael Zouroudis
Subject cascade problems
Date
Msg-id 3D8A07BC.2030203@idealcorp.com
Whole thread Raw
Responses Re: cascade problems  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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 by date:

Previous
From: "Johnson, Shaunn"
Date:
Subject: Re: killing process question
Next
From: Tom Lane
Date:
Subject: Re: killing process question