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

Trigger Procedures question

From: "Jean-Francois Leveque" <leveque(at)webmails(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Trigger Procedures question
Date: 2001-07-03 13:59:01
Message-ID: 20010703125901.24325.qmail@webmails.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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 WebMailS.com, mon adresse de courrier lectronique gratuite.
Service multilingue, sr, et permanent. http://www.webmails.com/

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2001-07-03 14:02:24
Subject: Re: selecting from cursor
Previous:From: Jan WieckDate: 2001-07-03 13:46:56
Subject: Re: Trigger Procedures question

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