truncate trigger for foreign data wrappers - Mailing list pgsql-hackers

From Murat Tuncer
Subject truncate trigger for foreign data wrappers
Date
Msg-id CAG9wYgYEDjS1AmwsLJguj=JGwHjK_bovD2r3J6OzpqnYey+dEQ@mail.gmail.com
Whole thread Raw
Responses Re: truncate trigger for foreign data wrappers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello

I recently hit a road blocker when I tried to create a truncate trigger on a foreign table. trigger.c::CreateTrigger() function has explicit check to block truncate trigger on foreign tables.

However, trigger.c::ExecuteTruncate() does not seem to have any problems issuing before/after triggers to fdws. 

Just tapping on the utility hook to catch truncate statement did not work when the fdw is inside inheritance hierarchy. 

Is there a way to enable truncate triggers for foreign tables in the long run ? Or be able to detect somehow my fdw table is getting a truncate request ?

thanks

-- 
Murat Tuncer
Software Engineer | Citus Data
mtuncer@citusdata.com

pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Refactoring of heapam code.
Next
From: Andreas Joseph Krogh
Date:
Subject: Re: Bogus ANALYZE results for an otherwise-unique column with many nulls