Forum OpenACS Q&A: Response to Bizarre Postgres Behavior

Posted by Don Baccus on
Yes, indeed it makes sense.  Returning NULL is how you cancel the operation on the row from within a trigger.  The statement continues though, so the DELETE doesn't return an error, just the fact that in this case your trigger cancelled the delete on each and every row.

(to abort the entire transaction you'd use RAISE ERROR)