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

Function do_sql_command

contrib/postgres_fdw/connection.c:568–579  ·  view source on GitHub ↗

* Convenience subroutine to issue a non-data-returning SQL command to remote */

Source from the content-addressed store, hash-verified

566 * Convenience subroutine to issue a non-data-returning SQL command to remote
567 */
568void
569do_sql_command(PGconn *conn, const char *sql)
570{
571 PGresult *res;
572
573 if (!PQsendQuery(conn, sql))
574 pgfdw_report_error(ERROR, NULL, conn, false, sql);
575 res = pgfdw_get_result(conn, sql);
576 if (PQresultStatus(res) != PGRES_COMMAND_OK)
577 pgfdw_report_error(ERROR, res, conn, true, sql);
578 PQclear(res);
579}
580
581/*
582 * Start remote transaction or subtransaction, if needed.

Callers 5

configure_remote_sessionFunction · 0.85
begin_remote_xactFunction · 0.85
pgfdw_xact_callbackFunction · 0.85
pgfdw_subxact_callbackFunction · 0.85

Calls 5

PQsendQueryFunction · 0.85
pgfdw_report_errorFunction · 0.85
pgfdw_get_resultFunction · 0.85
PQresultStatusFunction · 0.85
PQclearFunction · 0.85

Tested by

no test coverage detected