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

Function PQprepare

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

* PQprepare * Creates a prepared statement by issuing a Parse message. * * 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

2273 * when done with it.
2274 */
2275PGresult *
2276PQprepare(PGconn *conn,
2277 const char *stmtName, const char *query,
2278 int nParams, const Oid *paramTypes)
2279{
2280 if (!PQexecStart(conn))
2281 return NULL;
2282 if (!PQsendPrepare(conn, stmtName, query, nParams, paramTypes))
2283 return NULL;
2284 return PQexecFinish(conn);
2285}
2286
2287/*
2288 * PQexecPrepared

Callers 13

mainFunction · 0.85
test_uniqviolFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
prepare_commonFunction · 0.85
init_libpq_connFunction · 0.85
DescribeQueryFunction · 0.85

Calls 3

PQexecStartFunction · 0.85
PQsendPrepareFunction · 0.85
PQexecFinishFunction · 0.85

Tested by 9

mainFunction · 0.68
test_uniqviolFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68