* PQexecPrepared * Like PQexec, but execute a previously prepared statement, * using extended query protocol so we can pass parameters */
| 2290 | * using extended query protocol so we can pass parameters |
| 2291 | */ |
| 2292 | PGresult * |
| 2293 | PQexecPrepared(PGconn *conn, |
| 2294 | const char *stmtName, |
| 2295 | int nParams, |
| 2296 | const char *const *paramValues, |
| 2297 | const int *paramLengths, |
| 2298 | const int *paramFormats, |
| 2299 | int resultFormat) |
| 2300 | { |
| 2301 | if (!PQexecStart(conn)) |
| 2302 | return NULL; |
| 2303 | if (!PQsendQueryPrepared(conn, stmtName, |
| 2304 | nParams, paramValues, paramLengths, |
| 2305 | paramFormats, resultFormat)) |
| 2306 | return NULL; |
| 2307 | return PQexecFinish(conn); |
| 2308 | } |
| 2309 | |
| 2310 | /* |
| 2311 | * Common code for PQexec and sibling routines: prepare to send command |