aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index b91b7d27de9..fd20aa96aa9 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -2050,7 +2050,7 @@ postgresBeginForeignInsert(ModifyTableState *mtstate,
* Vars contained in those expressions.
*/
if (plan && plan->operation == CMD_UPDATE &&
- resultRelation == plan->nominalRelation)
+ resultRelation == plan->rootRelation)
resultRelation = mtstate->resultRelInfo[0].ri_RangeTableIndex;
}