Re: TRIGGER TRUNCATE -- CASCADE or RESTRICT - Mailing list pgsql-general

From Albe Laurenz
Subject Re: TRIGGER TRUNCATE -- CASCADE or RESTRICT
Date
Msg-id A737B7A37273E048B164557ADEF4A58B366193DC@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to TRIGGER TRUNCATE -- CASCADE or RESTRICT  (Andreas Ulbrich <andreas.ulbrich@matheversum.de>)
Responses Re: TRIGGER TRUNCATE -- CASCADE or RESTRICT
List pgsql-general
Andreas Ulbrich wrote:
> I'm in a handle for a trigger for TRUNCATE. Is it possible to find out
> whether the TRUNCATE TABLE ist called with CASCADE?

I don't think there is.

But you can find out the table where the trigger is defined and examine
if any foreign key constraints are referring to it.

If yes, then the trigger was called with CASCADE.
If no, it might have been called either way, but the effect would be the same.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Rémi Cura
Date:
Subject: Re: pl/python composite type array as input parameter
Next
From: Filipe Pina
Date:
Subject: Re: pl/python composite type array as input parameter