summaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/nodeForeignscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeForeignscan.c b/src/backend/executor/nodeForeignscan.c
index 6ebffadef19..63478cd12ad 100644
--- a/src/backend/executor/nodeForeignscan.c
+++ b/src/backend/executor/nodeForeignscan.c
@@ -160,7 +160,7 @@ ExecInitForeignScan(ForeignScan *node, EState *estate, int eflags)
/*
* Acquire function pointers from the FDW's handler, and init fdw_state.
*/
- fdwroutine = GetFdwRoutineByRelId(RelationGetRelid(currentRelation));
+ fdwroutine = GetFdwRoutineForRelation(currentRelation, true);
scanstate->fdwroutine = fdwroutine;
scanstate->fdw_state = NULL;