<para>
<programlisting>
void
-GetForeignRelSize (PlannerInfo *root,
- RelOptInfo *baserel,
- Oid foreigntableid);
+GetForeignRelSize(PlannerInfo *root,
+ RelOptInfo *baserel,
+ Oid foreigntableid);
</programlisting>
Obtain relation size estimates for a foreign table. This is called
<para>
<programlisting>
void
-GetForeignPaths (PlannerInfo *root,
- RelOptInfo *baserel,
- Oid foreigntableid);
+GetForeignPaths(PlannerInfo *root,
+ RelOptInfo *baserel,
+ Oid foreigntableid);
</programlisting>
Create possible access paths for a scan on a foreign table.
<para>
<programlisting>
ForeignScan *
-GetForeignPlan (PlannerInfo *root,
- RelOptInfo *baserel,
- Oid foreigntableid,
- ForeignPath *best_path,
- List *tlist,
- List *scan_clauses,
- Plan *outer_plan);
+GetForeignPlan(PlannerInfo *root,
+ RelOptInfo *baserel,
+ Oid foreigntableid,
+ ForeignPath *best_path,
+ List *tlist,
+ List *scan_clauses,
+ Plan *outer_plan);
</programlisting>
Create a <structname>ForeignScan</> plan node from the selected foreign
<para>
<programlisting>
void
-BeginForeignScan (ForeignScanState *node,
- int eflags);
+BeginForeignScan(ForeignScanState *node,
+ int eflags);
</programlisting>
Begin executing a foreign scan. This is called during executor startup.
<para>
<programlisting>
TupleTableSlot *
-IterateForeignScan (ForeignScanState *node);
+IterateForeignScan(ForeignScanState *node);
</programlisting>
Fetch one row from the foreign source, returning it in a tuple table slot
<para>
<programlisting>
void
-ReScanForeignScan (ForeignScanState *node);
+ReScanForeignScan(ForeignScanState *node);
</programlisting>
Restart the scan from the beginning. Note that any parameters the
<para>
<programlisting>
void
-EndForeignScan (ForeignScanState *node);
+EndForeignScan(ForeignScanState *node);
</programlisting>
End the scan and release resources. It is normally not important
<para>
<programlisting>
void
-GetForeignJoinPaths (PlannerInfo *root,
- RelOptInfo *joinrel,
- RelOptInfo *outerrel,
- RelOptInfo *innerrel,
- JoinType jointype,
- JoinPathExtraData *extra);
+GetForeignJoinPaths(PlannerInfo *root,
+ RelOptInfo *joinrel,
+ RelOptInfo *outerrel,
+ RelOptInfo *innerrel,
+ JoinType jointype,
+ JoinPathExtraData *extra);
</programlisting>
Create possible access paths for a join of two (or more) foreign tables
that all belong to the same foreign server. This optional
<para>
<programlisting>
void
-GetForeignUpperPaths (PlannerInfo *root,
- UpperRelationKind stage,
- RelOptInfo *input_rel,
- RelOptInfo *output_rel);
+GetForeignUpperPaths(PlannerInfo *root,
+ UpperRelationKind stage,
+ RelOptInfo *input_rel,
+ RelOptInfo *output_rel);
</programlisting>
Create possible access paths for <firstterm>upper relation</> processing,
which is the planner's term for all post-scan/join query processing, such
<para>
<programlisting>
void
-AddForeignUpdateTargets (Query *parsetree,
- RangeTblEntry *target_rte,
- Relation target_relation);
+AddForeignUpdateTargets(Query *parsetree,
+ RangeTblEntry *target_rte,
+ Relation target_relation);
</programlisting>
<command>UPDATE</> and <command>DELETE</> operations are performed
<para>
<programlisting>
List *
-PlanForeignModify (PlannerInfo *root,
- ModifyTable *plan,
- Index resultRelation,
- int subplan_index);
+PlanForeignModify(PlannerInfo *root,
+ ModifyTable *plan,
+ Index resultRelation,
+ int subplan_index);
</programlisting>
Perform any additional planning actions needed for an insert, update, or
<para>
<programlisting>
void
-BeginForeignModify (ModifyTableState *mtstate,
- ResultRelInfo *rinfo,
- List *fdw_private,
- int subplan_index,
- int eflags);
+BeginForeignModify(ModifyTableState *mtstate,
+ ResultRelInfo *rinfo,
+ List *fdw_private,
+ int subplan_index,
+ int eflags);
</programlisting>
Begin executing a foreign table modification operation. This routine is
<para>
<programlisting>
TupleTableSlot *
-ExecForeignInsert (EState *estate,
- ResultRelInfo *rinfo,
- TupleTableSlot *slot,
- TupleTableSlot *planSlot);
+ExecForeignInsert(EState *estate,
+ ResultRelInfo *rinfo,
+ TupleTableSlot *slot,
+ TupleTableSlot *planSlot);
</programlisting>
Insert one tuple into the foreign table.
<para>
<programlisting>
TupleTableSlot *
-ExecForeignUpdate (EState *estate,
- ResultRelInfo *rinfo,
- TupleTableSlot *slot,
- TupleTableSlot *planSlot);
+ExecForeignUpdate(EState *estate,
+ ResultRelInfo *rinfo,
+ TupleTableSlot *slot,
+ TupleTableSlot *planSlot);
</programlisting>
Update one tuple in the foreign table.
<para>
<programlisting>
TupleTableSlot *
-ExecForeignDelete (EState *estate,
- ResultRelInfo *rinfo,
- TupleTableSlot *slot,
- TupleTableSlot *planSlot);
+ExecForeignDelete(EState *estate,
+ ResultRelInfo *rinfo,
+ TupleTableSlot *slot,
+ TupleTableSlot *planSlot);
</programlisting>
Delete one tuple from the foreign table.
<para>
<programlisting>
void
-EndForeignModify (EState *estate,
- ResultRelInfo *rinfo);
+EndForeignModify(EState *estate,
+ ResultRelInfo *rinfo);
</programlisting>
End the table update and release resources. It is normally not important
<para>
<programlisting>
int
-IsForeignRelUpdatable (Relation rel);
+IsForeignRelUpdatable(Relation rel);
</programlisting>
Report which update operations the specified foreign table supports.
<para>
<programlisting>
bool
-PlanDirectModify (PlannerInfo *root,
- ModifyTable *plan,
- Index resultRelation,
- int subplan_index);
+PlanDirectModify(PlannerInfo *root,
+ ModifyTable *plan,
+ Index resultRelation,
+ int subplan_index);
</programlisting>
Decide whether it is safe to execute a direct modification
<para>
<programlisting>
void
-BeginDirectModify (ForeignScanState *node,
- int eflags);
+BeginDirectModify(ForeignScanState *node,
+ int eflags);
</programlisting>
Prepare to execute a direct modification on the remote server.
<para>
<programlisting>
TupleTableSlot *
-IterateDirectModify (ForeignScanState *node);
+IterateDirectModify(ForeignScanState *node);
</programlisting>
When the <command>INSERT</>, <command>UPDATE</> or <command>DELETE</>
<para>
<programlisting>
void
-EndDirectModify (ForeignScanState *node);
+EndDirectModify(ForeignScanState *node);
</programlisting>
Clean up following a direct modification on the remote server. It is
<para>
<programlisting>
RowMarkType
-GetForeignRowMarkType (RangeTblEntry *rte,
- LockClauseStrength strength);
+GetForeignRowMarkType(RangeTblEntry *rte,
+ LockClauseStrength strength);
</programlisting>
Report which row-marking option to use for a foreign table.
<para>
<programlisting>
HeapTuple
-RefetchForeignRow (EState *estate,
- ExecRowMark *erm,
- Datum rowid,
- bool *updated);
+RefetchForeignRow(EState *estate,
+ ExecRowMark *erm,
+ Datum rowid,
+ bool *updated);
</programlisting>
Re-fetch one tuple from the foreign table, after locking it if required.
<para>
<programlisting>
bool
-RecheckForeignScan (ForeignScanState *node, TupleTableSlot *slot);
+RecheckForeignScan(ForeignScanState *node,
+ TupleTableSlot *slot);
</programlisting>
Recheck that a previously-returned tuple still matches the relevant
scan and join qualifiers, and possibly provide a modified version of
<para>
<programlisting>
void
-ExplainForeignScan (ForeignScanState *node,
- ExplainState *es);
+ExplainForeignScan(ForeignScanState *node,
+ ExplainState *es);
</programlisting>
Print additional <command>EXPLAIN</> output for a foreign table scan.
<para>
<programlisting>
void
-ExplainForeignModify (ModifyTableState *mtstate,
- ResultRelInfo *rinfo,
- List *fdw_private,
- int subplan_index,
- struct ExplainState *es);
+ExplainForeignModify(ModifyTableState *mtstate,
+ ResultRelInfo *rinfo,
+ List *fdw_private,
+ int subplan_index,
+ struct ExplainState *es);
</programlisting>
Print additional <command>EXPLAIN</> output for a foreign table update.
<para>
<programlisting>
void
-ExplainDirectModify (ForeignScanState *node,
- ExplainState *es);
+ExplainDirectModify(ForeignScanState *node,
+ ExplainState *es);
</programlisting>
Print additional <command>EXPLAIN</> output for a direct modification
<para>
<programlisting>
bool
-AnalyzeForeignTable (Relation relation,
- AcquireSampleRowsFunc *func,
- BlockNumber *totalpages);
+AnalyzeForeignTable(Relation relation,
+ AcquireSampleRowsFunc *func,
+ BlockNumber *totalpages);
</programlisting>
This function is called when <xref linkend="sql-analyze"> is executed on
If provided, the sample collection function must have the signature
<programlisting>
int
-AcquireSampleRowsFunc (Relation relation, int elevel,
- HeapTuple *rows, int targrows,
- double *totalrows,
- double *totaldeadrows);
+AcquireSampleRowsFunc(Relation relation,
+ int elevel,
+ HeapTuple *rows,
+ int targrows,
+ double *totalrows,
+ double *totaldeadrows);
</programlisting>
A random sample of up to <parameter>targrows</> rows should be collected
<para>
<programlisting>
List *
-ImportForeignSchema (ImportForeignSchemaStmt *stmt, Oid serverOid);
+ImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid);
</programlisting>
Obtain a list of foreign table creation commands. This function is