In the big libpq patch, I accidentally removed the line where
current_exec_param was reset to 0. It's still required (which is a very
fiddly way to pass that value to ParseAndDescribeWithLibpq, but let's live
with it for now..)
pstmt = stmt->processed_statements;
+ stmt->current_exec_param = 0;
res = ParseAndDescribeWithLibpq(stmt, plan_name, pstmt->query, pstmt->num_params, "prepare_and_describe", NULL);
if (res == NULL)
goto cleanup;
* Returns an empty result set that has the column information, or error code
* and message, filled in. If 'res' is not NULL, it is the result set
* returned, otherwise a new one is allocated.
+ *
+ * NB: The caller must set stmt->current_exec_param before calling this
+ * function!
*/
QResultClass *
ParseAndDescribeWithLibpq(StatementClass *stmt, const char *plan_name,