Re: trigger : emulate "instead of" with before ? - Mailing list pgsql-sql

From Tom Lane
Subject Re: trigger : emulate "instead of" with before ?
Date
Msg-id 352.1055512645@sss.pgh.pa.us
Whole thread Raw
In response to trigger : emulate "instead of" with before ?  ("Albrecht Berger" <berger1517@gmx.ch>)
List pgsql-sql
"Albrecht Berger" <berger1517@gmx.ch> writes:
> I need a trigger which is updating a delete flag of a row instead of
> deleting it physically.

> How do I implement a trigger which doesn't execute a delete without raising
> an exception in plsql ?

If the BEFORE DELETE trigger returns NULL, the delete is skipped.
        regards, tom lane


pgsql-sql by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: trigger : emulate "instead of" with before ?
Next
From: Demidem Mohamed Amine
Date:
Subject: create tables within functions