From: | tech7890(at)yahoo(dot)com (Andrew) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | updating table field whenever other table field changes |
Date: | 2003-03-28 15:12:33 |
Message-ID: | ba957261.0303280712.4bce00b4@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello postgresql.questions group!
What do you think the best way to attack the following is:
parent table a - [status_field]
child table b - [status_field]
I need trigger or similar to achieve the following:
if a.status_field changes than all children of table a have their
b.status_field change to the same value as a.
However if b.status_field changes its parent record, a.status_field,
does not change.
Should I just create a separate update trigger or can I set this up
right when I am declaring these tables to achive this.
I also do not really understand CONSTRAINT TRIGGER and how it differs
from a regular old TRIGGER. What do these internal TRIGGERS,
particularly "RI_FKey_noaction_upd" do?
Thanks for your time. Any help or advice is appreciated.
-------
Andrew C.
tech7890(at)NOTPART@yahoo.com
Please remove characters 'NOTPART' from e-mail address above to e-mail
me
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2003-03-28 16:08:20 | Re: Slow query needs a kick in the pants. |
Previous Message | Dave Smith | 2003-03-28 14:31:29 | Re: System dump, but not in the default format |