postgresql_16:8.8.2.7 FDW Routines for EXPLAIN
PostgreSQL 16 > Internals > Writing a Foreign Data Wrapper > Foreign Data Wrapper Callback Routines > FDW Routines for EXPLAIN
void ExplainForeignScan(ForeignScanState *node, ExplainState *es); Print additional EXPLAIN output for a foreign table scan. This function can call ExplainPropertyText and related functions to add fields to the EXPLAIN output. The flag fields in es can be used to determine what to print, and the state of the ForeignScanState node can be inspected to provide run-time statistics in the EXPLAIN ANALYZE case.
If the ExplainForeignScan pointer is set to NULL, no additional information is printed during EXPLAIN.
void ExplainForeignModify(ModifyTableState *mtstate, ResultRelInfo *rinfo, List *fdw_private, int subplan_index, struct ExplainState *es); Print additional EXPLAIN output for a foreign table update. This function can call ExplainPropertyText and related functions to add fields to the EXPLAIN output. The flag fields in es can be used to determine what to print, and the state of the ModifyTableState node can be inspected to provide run-time statistics in the EXPLAIN ANALYZE case. The first four arguments are the same as for BeginForeignModify.
If the ExplainForeignModify pointer is set to NULL, no additional information is printed during EXPLAIN.
void ExplainDirectModify(ForeignScanState *node, ExplainState *es); Print additional EXPLAIN output for a direct modification on the remote server. This function can call ExplainPropertyText and related functions to add fields to the EXPLAIN output. The flag fields in es can be used to determine what to print, and the state of the ForeignScanState node can be inspected to provide run-time statistics in the EXPLAIN ANALYZE case.
If the ExplainDirectModify pointer is set to NULL, no additional information is printed during EXPLAIN.