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

Function PQexec

src/interfaces/libpq/fe-exec.c:2231–2239  ·  view source on GitHub ↗

* PQexec * send a query to the backend and package up the result in a PGresult * * If the query was not even sent, return NULL; conn->errorMessage is set to * a relevant message. * If the query was sent, a new PGresult is returned (which could indicate * either success or failure). * The user is responsible for freeing the PGresult via PQclear() * when done with it. */

Source from the content-addressed store, hash-verified

2229 * when done with it.
2230 */
2231PGresult *
2232PQexec(PGconn *conn, const char *query)
2233{
2234 if (!PQexecStart(conn))
2235 return NULL;
2236 if (!PQsendQuery(conn, query))
2237 return NULL;
2238 return PQexecFinish(conn);
2239}
2240
2241/*
2242 * PQexecParams

Callers 15

pgfdw_xact_callbackFunction · 0.85
vacuumloFunction · 0.85
dblink_openFunction · 0.85
dblink_closeFunction · 0.85
dblink_fetchFunction · 0.85
dblink_execFunction · 0.85
sql_connFunction · 0.85
sql_execFunction · 0.85
executeQueryFunction · 0.85
executeCommandFunction · 0.85
run_permutationFunction · 0.85

Calls 3

PQexecStartFunction · 0.85
PQsendQueryFunction · 0.85
PQexecFinishFunction · 0.85

Tested by 15

run_permutationFunction · 0.68
test_pipeline_abortFunction · 0.68
test_preparedFunction · 0.68
test_transactionFunction · 0.68
test_uniqviolFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
check_prepare_connFunction · 0.68
exec_sql_with_resultsetFunction · 0.68