Any plans on allowing user-defined triggers to be deferrable?
В списке pgsql-general по дате отправления:
| От | Mike Mascari |
|---|---|
| Тема | Any plans on allowing user-defined triggers to be deferrable? |
| Дата | |
| Msg-id | 417E4959.5080203@mascari.com обсуждение исходный текст |
| Ответы |
Re: Any plans on allowing user-defined triggers to be
Re: Any plans on allowing user-defined triggers to be |
| Список | pgsql-general |
I'd like to ensure that the creation of a department also implies the creation of two to eight projects; no more, no less: CREATE TABLE departments ( department text primary key not null ); CREATE TABLE projects ( project text primary key not null, department text not null references departments(department) on delete cascade on update cascade ); So it'd be nice to have an INSERT trigger that's fired on departments at the end of the transaction to ensure that between two and eight projects exist for the newly created department. Is there no way to achieve the above stated goal in the server? Must I rely on the application to enforce consistency? Mike Mascari
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера