Re: Prevent from Deletion

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Prevent from Deletion
Дата
Msg-id m3isodb2z3.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на Prevent from Deletion  (Alex <alex@meerkatsoft.com>)
Ответы Re: Prevent from Deletion  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-general
Alex <alex@meerkatsoft.com> writes:

> Hi,
> I have tables that have default records that must not be deleted or
> modified.
> Is there an easy way to do this. Like setting a trigger on the Primary
> key value ?

You could do this--create ON UPDATE and ON DELETE triggers that look
for distinguishing features of the default records (primary key value
or whatever) and RAISE ERROR if they match.  They'll be executed for
every UPDATE and DELETE on the table, which may or may not be a
performance issue for you...

-Doug

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: About GPL and proprietary software
Следующее
От: mgarriss
Дата:
Сообщение: Getting last inserted SERIAL