diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/foreign/fdwapi.h | 1 | ||||
-rw-r--r-- | src/include/utils/rel.h | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/include/foreign/fdwapi.h b/src/include/foreign/fdwapi.h index 13dcbfdf8c7..562d5412df7 100644 --- a/src/include/foreign/fdwapi.h +++ b/src/include/foreign/fdwapi.h @@ -96,5 +96,6 @@ typedef struct FdwRoutine /* Functions in foreign/foreign.c */ extern FdwRoutine *GetFdwRoutine(Oid fdwhandler); extern FdwRoutine *GetFdwRoutineByRelId(Oid relid); +extern FdwRoutine *GetFdwRoutineForRelation(Relation relation, bool makecopy); #endif /* FDWAPI_H */ diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 06e1531e9a3..a4daf772e57 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -166,6 +166,17 @@ typedef struct RelationData Oid *rd_indcollation; /* OIDs of index collations */ /* + * foreign-table support + * + * rd_fdwroutine must point to a single memory chunk palloc'd in + * CacheMemoryContext. It will be freed and reset to NULL on a relcache + * reset. + */ + + /* use "struct" here to avoid needing to include fdwapi.h: */ + struct FdwRoutine *rd_fdwroutine; /* cached function pointers, or NULL */ + + /* * Hack for CLUSTER, rewriting ALTER TABLE, etc: when writing a new * version of a table, we need to make any toast pointers inserted into it * have the existing toast table's OID, not the OID of the transient toast |