From 3d956d9562aa4811b5eaaaf5314d361c61be2ae0 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Fri, 6 Apr 2018 19:16:11 -0400 Subject: Allow insert and update tuple routing and COPY for foreign tables. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also enable this for postgres_fdw. Etsuro Fujita, based on an earlier patch by Amit Langote. The larger patch series of which this is a part has been reviewed by Amit Langote, David Fetter, Maksim Milyutin, Álvaro Herrera, Stephen Frost, and me. Minor documentation changes to the final version by me. Discussion: http://postgr.es/m/29906a26-da12-8c86-4fb9-d8f88442f2b9@lab.ntt.co.jp --- src/backend/executor/execMain.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/backend/executor/execMain.c') diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index e4d9b0b3f88..cc47f5df402 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -1179,13 +1179,6 @@ CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation) switch (operation) { case CMD_INSERT: - - /* - * If foreign partition to do tuple-routing for, skip the - * check; it's disallowed elsewhere. - */ - if (resultRelInfo->ri_PartitionRoot) - break; if (fdwroutine->ExecForeignInsert == NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -1378,6 +1371,7 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo, resultRelInfo->ri_PartitionCheck = partition_check; resultRelInfo->ri_PartitionRoot = partition_root; + resultRelInfo->ri_PartitionReadyForRouting = false; } /* -- cgit v1.2.3