Thread: TRIGGER on a FOREIGN Table?

TRIGGER on a FOREIGN Table?

From
Sbob
Date:
All;


does anyone know: can I create a trigger on a foreign table? I suspect I 
have to create the trigger on the remote / source table yes?




Re: TRIGGER on a FOREIGN Table?

From
"David G. Johnston"
Date:
On Mon, Nov 6, 2023 at 9:15 PM Sbob <sbob@quadratum-braccas.com> wrote:
does anyone know: can I create a trigger on a foreign table? I suspect I
have to create the trigger on the remote / source table yes?


David J.


Re: TRIGGER on a FOREIGN Table?

From
Laurenz Albe
Date:
On Mon, 2023-11-06 at 21:15 -0700, Sbob wrote:
> does anyone know: can I create a trigger on a foreign table? I suspect I
> have to create the trigger on the remote / source table yes?

You can create a trigger on a foreign table.  But don't get confused:

- the trigger will run locally, not on the remote database
- the trigger will not run if the table on the remote database is modified

Yours,
Laurenz Albe



Re: TRIGGER on a FOREIGN Table?

From
Sbob
Date:
Got it, Thanks!


On 11/7/23 00:30, Laurenz Albe wrote:
> On Mon, 2023-11-06 at 21:15 -0700, Sbob wrote:
>> does anyone know: can I create a trigger on a foreign table? I suspect I
>> have to create the trigger on the remote / source table yes?
> You can create a trigger on a foreign table.  But don't get confused:
>
> - the trigger will run locally, not on the remote database
> - the trigger will not run if the table on the remote database is modified
>
> Yours,
> Laurenz Albe