Re: truncate trigger for foreign data wrappers

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Murat Tuncer <mtuncer(at)citusdata(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: truncate trigger for foreign data wrappers
Date: 2016-08-05 14:39:18
Message-ID: 20160805143918.uwqeqkrkyzl6s4sn@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-08-05 10:33:49 -0400, Tom Lane wrote:
> Murat Tuncer <mtuncer(at)citusdata(dot)com> writes:
> > 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.
>
> That's good, because we don't implement TRUNCATE on foreign tables: there
> is nothing in the FDW API that would support it. Not much point in
> declaring a trigger for an event that can never happen.

Well, allowing BEFORE triggers to return NULL or something, preventing
the execution of the rest, would be such an implementation, and also
independently useful.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-08-05 14:57:35 Re: pg_size_pretty, SHOW, and spaces
Previous Message Kenneth Marshall 2016-08-05 14:39:17 Hash index with larger hashes