Delete triggers

Поиск
Список
Период
Сортировка
От Mathew Frank
Тема Delete triggers
Дата
Msg-id 0a9801c2f9dd$8210e870$0a00a8c0@dax
обсуждение исходный текст
Ответы Re: Delete triggers
Список pgsql-bugs
I have had a lot of trouble getting a DELETE trigger to do nothing (ie let =
the delete operation occur instead of cancelling it, as required)

The documentation on this is very thin on the ground - I`ve just spend 4 Ho=
urs googling and the best I could find was one of the main developers (Bruc=
e?? sorry - too long ago) replying to an email in 2001.    Which was to NOT=
 cancel the delete operation, you need to return NEW or OLD.

 - If I return NULL the operation is cancelled.  ("DELETE 0")
 - If I return NEW the operation is cancelled.  ("DELETE 0") Now NEW is not=
 set for a delete (because it would make no sense) so I am thinking this is=
 the same as returning NULL
 - If I return OLD the operation is cancelled ("DELETE 0").

I am using the 7.2 version.


To me this is either a bug in the system, or a 'bug' in the documentation. =
  Look forward to hearing from you.

Cheers,
Mathew

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #931: bugs "create user" "alter user"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Delete triggers