| От | Robert Fitzpatrick |
|---|---|
| Тема | Re: Test for cascade delete in plpgsql |
| Дата | |
| Msg-id | 4E9831AD.6040402@webtent.org обсуждение исходный текст |
| Ответ на | Re: Test for cascade delete in plpgsql ("David Johnston" <polobo@yahoo.com>) |
| Список | pgsql-general |
On 10/13/2011 5:45 PM, David Johnston wrote: > the company record should not be visible > if you execute a SELECT against the companies table using the given > company_id value. The previous is not tested and I am not totally sure > about the visibility rules in this situation (mainly whether the cascade > delete occurs before or after the statement delete) Yes, you understood exactly what I am trying to do, and it appears the cascade delete occurs after, I didn't even think of that. If I PERFORM a query on the companies table to test if the record exists in the DELETE AFTER trigger of the contacts table and base my restriction on IF FOUND, the record is allowed to be deleted. Thanks!
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера