Skip site navigation (1) Skip section navigation (2)

Trigger Procedures question

From: "Jean-Francois Leveque" <leveque(at)webmails(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Trigger Procedures question
Date: 2001-06-29 16:21:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
I want to check something before
a delete is made.

I made a before delete trigger that
calls a procedure.

The procedure raises an exception
when I don't want the delete to be
made (I could also have returned NULL,
but wouldn't have get much information
from it).

The question is :
What do I return when I want the delete to be made ?

If I return OLD (known when deleting), maybe that
cancels the delete too.

I don't have NEW (known only on insert/update).

I couldn't find the answer in the docs.

Best regards,

Jean-Francois Leveque

Sur, mon adresse de courrier lectronique gratuite.
Service multilingue, sr, et permanent.

pgsql-docs by date

Next:From: Jean-S├ębastien ANDUJARDate: 2001-07-03 10:25:41
Subject: replication
Previous:From: Weiping HeDate: 2001-06-28 12:42:46
Subject: Re: RE: Hello

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group