| От | Sim Zacks |
|---|---|
| Тема | Re: trigger update delete - found it |
| Дата | |
| Msg-id | da84pf$1lkl$1@news.hub.org обсуждение исходный текст |
| Ответ на | trigger update delete ("Sim Zacks" <sim@compulab.co.il>) |
| Список | pgsql-general |
I found the TG_OP variable which tels me which operation is currently being done. "Sim Zacks" <sim@compulab.co.il> wrote in message news:da83sd$1i7g$1@news.hub.org... > I am trying to write a trigger function that will do something when either a > row had been deleted or a field has been updated to null. > > The problem I am having is determining in the function if this is a delete > or not. I would like to say: > if this is delete trigger or new.field1 is null then > ... > end if > > new.field1 dies when it is a delete trigger, as it is supposed to. But I > need the function to know the difference. > > Any thoughts? > >
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера