Triggers on foreign tables

From: Ronan Dunklau <rdunklau(at)gmail(dot)com>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Triggers on foreign tables
Date: 2013-09-10 12:08:20
Message-ID: 1553612.aNJakFASte@ronan_laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


I wanted to know what it would take to implement triggers on foreign tables.
It seems that statement-level triggers can work provided they are allowed in
the code.

Please find attached a simple POC patch that implement just that.

For row-level triggers, it seems more complicated. From what I understand,
OLD/NEW tuples are fetched from the heap using their ctid (except for BEFORE
INSERT triggers). How could this be adapted for foreign tables ?

Ronan Dunklau

Attachment Content-Type Size
foreign_triggers_v1.patch text/x-patch 9.0 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message MauMau 2013-09-10 12:38:17 Re: [bug fix] strerror() returns ??? in a UTF-8/C database withLC_MESSAGES=non-ASCII
Previous Message Oleg Bartunov 2013-09-10 11:58:44 Re: Hstore: Query speedups with Gin index