| От | domingo@dad-it.com (Domingo Alvarez Duarte) |
|---|---|
| Тема | Re: A bug in triggers PG 7.1.3 or misunderstand ? |
| Дата | |
| Msg-id | 70a76315.0109280028.439dff84@posting.google.com обсуждение исходный текст |
| Ответ на | Re: A bug in triggers PG 7.1.3 or misunderstand ? (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-sql |
tgl@sss.pgh.pa.us (Tom Lane) wrote in message news:<28856.1001608373@sss.pgh.pa.us>... > I think you need "return old", not "return new", in the body of the > trigger if you want the delete to take place. new would be NULL in > a delete situation ... > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html Ok I saw that in the documentation so I tryied a variant of it: if TG_OP = 'DELETE' thenreturn old; elsereturn new; end if; But the TG_OP comes empty and it allawys try return new preventing the delete to happen. And that was supposed to work isn't it ?
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера