Re: TRIGGER TRUNCATE -- CASCADE or RESTRICT

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Andreas Ulbrich *EXTERN*'" <andreas(dot)ulbrich(at)matheversum(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: TRIGGER TRUNCATE -- CASCADE or RESTRICT
Date: 2015-06-02 09:31:25
Message-ID: A737B7A37273E048B164557ADEF4A58B366193DC@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Filipe Pina 2015-06-02 10:10:05 Re: pl/python composite type array as input parameter
Previous Message Rémi Cura 2015-06-02 08:41:04 Re: pl/python composite type array as input parameter