truncate trigger for foreign data wrappers

From: Murat Tuncer <mtuncer(at)citusdata(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: truncate trigger for foreign data wrappers
Date: 2016-08-05 09:21:40
Message-ID: CAG9wYgYEDjS1AmwsLJguj=JGwHjK_bovD2r3J6OzpqnYey+dEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)citusdata(dot)com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Joseph Krogh 2016-08-05 09:43:04 Re: Bogus ANALYZE results for an otherwise-unique column with many nulls
Previous Message Thom Brown 2016-08-05 09:17:54 Re: Refactoring of heapam code.