Re: Dependancies on Tables

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Dependancies on Tables
Дата
Msg-id 20030626200254.GA10205@wolff.to
обсуждение исходный текст
Ответ на Dependancies on Tables  ("Bryan Zera" <Bryanz@pollstar.com>)
Список pgsql-general
On Thu, Jun 26, 2003 at 12:44:10 -0700,
  Bryan Zera <Bryanz@pollstar.com> wrote:
>
> Originally, I thought I would just add triggers/functions to the
> related tables so that if someone tried to delete them, it would not
> allow the user to delete.  But then I realized that if I added a
> trigger/function combination to the related tables that prevents
> deletion, the functions that are triggered by the user deletion would
> also be blocked from deleting from that table.

Can't the trigger check to see if the user record is still there and
only block the deletion if it is?

You will also want an update trigger to make sure the user field
can't be changed.

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

Предыдущее
От:
Дата:
Сообщение: Re: How many fields in a table are too many
Следующее
От: Mikhail Terekhov
Дата:
Сообщение: Re: PlPython