Delete triggers

From: "Mathew Frank" <mathewfrank(at)qushi(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Delete triggers
Date: 2003-04-03 12:35:26
Message-ID: 0a9801c2f9dd$8210e870$0a00a8c0@dax
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Hours googling and the best I could find was one of the main developers (Bruce?? 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tony Harper 2003-04-03 12:56:38 RelationBuildDesc Notice
Previous Message pgsql-bugs 2003-04-03 09:16:10 Bug #931: bugs "create user" "alter user"