| От | Doug McNaught |
|---|---|
| Тема | Re: Prevent from Deletion |
| Дата | |
| Msg-id | m3isodb2z3.fsf@varsoon.wireboard.com обсуждение исходный текст |
| Ответ на | Prevent from Deletion (Alex <alex@meerkatsoft.com>) |
| Ответы |
Re: Prevent from Deletion
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера