Andrei Bintintan mentioned :
=> Your problem depends on what interface/programming language you're using.
Yep, I tried to do it using rules or triggers, but I can't get it to do what I want
exactly, and it's not a good idea to put any rules or triggers on my database.
I'm sticking to psql though, and managed to create the query with a nested
nullif and coalesce to make my query fail if there are 0 rows matching for
an update or delete.
Cheers
Stef