Re: Constraint Question

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Constraint Question
Дата
Msg-id 20060317080159.GA25138@wolff.to
обсуждение исходный текст
Ответ на Constraint Question  (Kai Hessing <kai.hessing@hobsons.de>)
Ответы Re: Constraint Question  (Kai Hessing <kai.hessing@hobsons.de>)
Список pgsql-general
On Thu, Mar 16, 2006 at 18:11:33 +0100,
  Kai Hessing <kai.hessing@hobsons.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.

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

Предыдущее
От: Etienne Labuschagne
Дата:
Сообщение: Slow trigger on identical DB but different machine
Следующее
От: Leonardo Francalanci
Дата:
Сообщение: Re: Replication & web apps