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

Determin if cascade is being used

From: Martin Foster <martin(at)ethereal-realms(dot)org>
To: PostgreSQL Novice List <pgsql-novice(at)postgresql(dot)org>
Subject: Determin if cascade is being used
Date: 2005-10-17 16:26:56
Message-ID: 4353D0D0.6090808@ethereal-realms.org (view raw or flat)
Thread:
Lists: pgsql-novice
Is there a way to tell in PL/PgSQL if the delete coming down the line is 
from a cascade delete?   I have a trigger, which when called will throw 
an error because the row its trying to change is now linked with an item 
which no longer exists.   The foreign key constraint fails since it was 
removed before underlaying components were.

This would also greatly speed up the trigger since it could skip any 
updates at all!   Thanks in advance.


	Martin Foster
	martin(at)ethereal-realms(dot)org


Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2005-10-17 17:27:57
Subject: Re: Determin if cascade is being used
Previous:From: Oliver ElphickDate: 2005-10-17 13:03:55
Subject: Re: Switching from MySQL -- Missing DESCRIBE table, SHOW

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