MCPcopy Create free account
hub / github.com/apache/cloudberry / postgresExplainForeignModify

Function postgresExplainForeignModify

contrib/postgres_fdw/postgres_fdw.c:2928–2949  ·  view source on GitHub ↗

* postgresExplainForeignModify * Produce extra output for EXPLAIN of a ModifyTable on a foreign table */

Source from the content-addressed store, hash-verified

2926 * Produce extra output for EXPLAIN of a ModifyTable on a foreign table
2927 */
2928static void
2929postgresExplainForeignModify(ModifyTableState *mtstate,
2930 ResultRelInfo *rinfo,
2931 List *fdw_private,
2932 int subplan_index,
2933 ExplainState *es)
2934{
2935 if (es->verbose)
2936 {
2937 char *sql = strVal(list_nth(fdw_private,
2938 FdwModifyPrivateUpdateSql));
2939
2940 ExplainPropertyText("Remote SQL", sql, es);
2941
2942 /*
2943 * For INSERT we should always have batch size >= 1, but UPDATE and
2944 * DELETE don't support batching so don't show the property.
2945 */
2946 if (rinfo->ri_BatchSize > 0)
2947 ExplainPropertyInteger("Batch Size", NULL, rinfo->ri_BatchSize, es);
2948 }
2949}
2950
2951/*
2952 * postgresExplainDirectModify

Callers

nothing calls this directly

Calls 3

list_nthFunction · 0.85
ExplainPropertyTextFunction · 0.85
ExplainPropertyIntegerFunction · 0.85

Tested by

no test coverage detected