Re: Constraint Question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Kai Hessing <kai(dot)hessing(at)hobsons(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Constraint Question
Date: 2006-03-17 08:01:59
Message-ID: 20060317080159.GA25138@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 16, 2006 at 18:11:33 +0100,
Kai Hessing <kai(dot)hessing(at)hobsons(dot)de> wrote:
>
> The 'status'-row can contain either 1 or -1 and -4. And now I would like
> to implement the action that if the the status field in the master table
> for a special sid is changed, all status-fields in phon for entries
> which referencing this sid are also changed.
>
> Can this be done somehow with a foreign key? If it can, how?

This seems kind of odd. If the values are supposed to be the same, why are
you including them in multiple tables? If there aren't supposed to always
be the same, you won't be able to use foreign keys to sometimes make them
the same.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leonardo Francalanci 2006-03-17 08:19:10 Re: Replication & web apps
Previous Message Etienne Labuschagne 2006-03-17 07:29:40 Slow trigger on identical DB but different machine