pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Sbob <sbob@quadratum-braccas.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: TRIGGER on a FOREIGN Table?
Date: Tue, 07 Nov 2023 08:30:15 +0100
Message-ID: <5031db5a11ea0e29b16b4a08e7dd0a3f67f55444.camel@cybertec.at> (raw)
In-Reply-To: <0c27ded3-4cf5-45a6-b186-41f75778f625@quadratum-braccas.com>
References: <0c27ded3-4cf5-45a6-b186-41f75778f625@quadratum-braccas.com>

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





view thread (4+ messages)  latest in thread

Message-ID: <5031db5a11ea0e29b16b4a08e7dd0a3f67f55444.camel@cybertec.at>
Permalink:  ../5031db5a11ea0e29b16b4a08e7dd0a3f67f55444.camel@cybertec.at/
Also on:    postgresql.org/message-id/5031db5a11ea0e29b16b4a08e7dd0a3f67f55444.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, sbob@quadratum-braccas.com, pgsql-admin@lists.postgresql.org
  Subject: Re: TRIGGER on a FOREIGN Table?
  In-Reply-To: <5031db5a11ea0e29b16b4a08e7dd0a3f67f55444.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox