Test for cascade delete in plpgsql

Поиск
Список
Период
Сортировка
От Robert Fitzpatrick
Тема Test for cascade delete in plpgsql
Дата
Msg-id 4E974C77.3060402@webtent.org
обсуждение исходный текст
Ответы Re: Test for cascade delete in plpgsql  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-general
My contacts table has a FK with cascade delete to foreign table
companies using the company_id column.

I have a DELETE AFTER trigger on my contacts table that checks to see if
there are any contacts left with an email address or it won't allow you
to delete the record for a company. However, if the company is being
deleted, is there a way I can test for the cascade delete reason and
have my trigger allow the contact to be deleted?

--Robert

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

Предыдущее
От: Evan Walter
Дата:
Сообщение: Re: [ADMIN] Trying to use binary replication - from tutorial
Следующее
От: Bob Hatfield
Дата:
Сообщение: Re: pg 8.3 replication causing corruption