public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
To: Önder Kalacı <[email protected]>
Cc: Matheus Alcantara <[email protected]>
Cc: Pg Hackers <[email protected]>
Subject: Re: Allow FDW extensions to support MERGE command via CustomScan
Date: Fri, 13 Dec 2024 12:04:33 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACawEhVukGuv3J9WV-NiJSA2-KMOd4QWZqxmSZYG3nCPeb4g+Q@mail.gmail.com>

On 2024-Dec-13, Önder Kalacı wrote:

> Matheus Alcantara <[email protected]> wrote:

> > I didn't understand what is a "custom scan node" on the fdw context at
> > first place (I don't know if it is an already know word on this
> > context), but from what I've understood so far, to a fdw extension
> > support MERGE it should implements on PlanForeignModify right?
> 
> In the long term, I think that's a good plan. First, the core code in
> ExecMerge() should be aware of foreign tables, then each foreign table
> should handle Merge command planning on its own PlanForeignModify.
> That'd be great, because the execution of Merge command is pretty
> complex, and in essence Postgres would be providing the solid
> infrastructure for all foreign tables.
> 
> However, I expect that to be a non-trivial patch. Instead, the goal of
> this patch is to at least let extensions to completely override the
> planning & execution via CustomScan, not confined to Postgres' foreign
> table planning & execution.

IMO this is a bad plan.  It'll become _the_ way to run MERGE on foreign
tables, which will become a selling point for proprietary FDWs, and
nobody will be motivated to write the code to implement the long-term
plan you were describing.

In short, -1 from me.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/






view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Allow FDW extensions to support MERGE command via CustomScan
  In-Reply-To: <[email protected]>

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

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