Обсуждение: TRIGGER on a FOREIGN Table?

Поиск
Список
Период
Сортировка

TRIGGER on a FOREIGN Table?

От
Sbob
Дата:
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?

От
"David G. Johnston"
Дата:
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?

От
Laurenz Albe
Дата:
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?

От
Sbob
Дата:
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