mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Arrange to cache FdwRoutine structs in foreign tables' relcache entries.
This saves several catalog lookups per reference. It's not all that exciting right now, because we'd managed to minimize the number of places that need to fetch the data; but the upcoming writable-foreign-tables patch needs this info in a lot more places.
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user