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

Function executeStatement

src/bin/pgbench/pgbench.c:1330–1343  ·  view source on GitHub ↗

call PQexec() and exit() on failure */

Source from the content-addressed store, hash-verified

1328
1329/* call PQexec() and exit() on failure */
1330static void
1331executeStatement(PGconn *con, const char *sql)
1332{
1333 PGresult *res;
1334
1335 res = PQexec(con, sql);
1336 if (PQresultStatus(res) != PGRES_COMMAND_OK)
1337 {
1338 pg_log_fatal("query failed: %s", PQerrorMessage(con));
1339 pg_log_info("query was: %s", sql);
1340 exit(1);
1341 }
1342 PQclear(res);
1343}
1344
1345/* call PQexec() and complain, but without exiting, on failure */
1346static void

Callers 9

initDropTablesFunction · 0.85
createPartitionsFunction · 0.85
initCreateTablesFunction · 0.85
initTruncateTablesFunction · 0.85
initVacuumFunction · 0.85
initCreatePKeysFunction · 0.85
initCreateFKeysFunction · 0.85

Calls 4

PQexecFunction · 0.85
PQresultStatusFunction · 0.85
PQerrorMessageFunction · 0.85
PQclearFunction · 0.85

Tested by

no test coverage detected