Re: Fix error message for MERGE foreign tables - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Fix error message for MERGE foreign tables
Date
Msg-id CAMbWs48dy=uEwKeJHqoyWuHD+NTbrRLp6H7y4zVxf1Cuqd7sMw@mail.gmail.com
Whole thread Raw
In response to Re: Fix error message for MERGE foreign tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On Fri, Oct 14, 2022 at 10:43 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Richard Guo <guofenglinux@gmail.com> writes:
> Or maybe we can make it even earlier, when we expand an RTE for a
> partitioned table and add result tables to leaf_result_relids.

I'm not really on board with injecting command-type-specific logic into
completely unrelated places just so that we can throw an error a bit
earlier.  Alvaro's suggestion of make_modifytable seemed plausible,
not least because it avoids spending any effort when the command
couldn't be MERGE at all.
 
Yeah, that makes sense. Putting this check in inherit.c does look some
weird as there is no other commandType related code in that file.

Agree that Alvaro's suggestion is more reasonable.

Thanks
Richard

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: create subscription - improved warning message
Next
From: Michael Paquier
Date:
Subject: Re: Add regular expression testing for user name mapping in the peer authentication TAP test