mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Allow insert and update tuple routing and COPY for foreign tables.
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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user