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

Function postgresEndDirectModify

contrib/postgres_fdw/postgres_fdw.c:2797–2815  ·  view source on GitHub ↗

* postgresEndDirectModify * Finish a direct foreign table modification */

Source from the content-addressed store, hash-verified

2795 * Finish a direct foreign table modification
2796 */
2797static void
2798postgresEndDirectModify(ForeignScanState *node)
2799{
2800 PgFdwDirectModifyState *dmstate = (PgFdwDirectModifyState *) node->fdw_state;
2801
2802 /* if dmstate is NULL, we are in EXPLAIN; nothing to do */
2803 if (dmstate == NULL)
2804 return;
2805
2806 /* Release PGresult */
2807 if (dmstate->result)
2808 PQclear(dmstate->result);
2809
2810 /* Release remote connection */
2811 ReleaseConnection(dmstate->conn);
2812 dmstate->conn = NULL;
2813
2814 /* MemoryContext will be deleted automatically. */
2815}
2816
2817/*
2818 * postgresExplainForeignScan

Callers

nothing calls this directly

Calls 2

PQclearFunction · 0.85
ReleaseConnectionFunction · 0.85

Tested by

no test coverage detected