"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
> Now, what I want to do is add a FOREIGN KEY (again, I think) that when 
> incident_summary.status is changed (either closed, or reopened), the 
> associated records in incident_comments are changed to the same state ...

Why not just get rid of the status column in incident_comments, and
treat incident_summary.status as the sole copy of the state?  When you
need to get to it from incident_comments, you do a join.

The foreign key you really ought to have here is from
incident_comments.incident_id to incident_summary.id
(assuming that I've understood your schema correctly).

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to