In one of my environments, this feature didn't work as expected. Digging into it, I found that it is incompatible with
FETCH_COUNTbeing set. Sorry for not recognising this during the betas.
Attached a simple patch with tests running the cursor declaration through PQexecParams instead of PGexec.
Alternatively, we could avoid going to ExecQueryUsingCursor and force execution via ExecQueryAndProcessResults in
SendQuery(around line 1134 in src/bin/psql/common.c) when \bind is used:
else if (pset.fetch_count <= 0 || pset.gexec_flag ||
- pset.crosstab_flag || !is_select_command(query))
+ pset.crosstab_flag || !is_select_command(query) ||
+ pset.bind_flag)
best regards
Tobias