Someone posted something on the DBD::Pg mailing list recently that
made me wonder if the user's problem is more of a "don't do that"
or something that may be solvable with a libpq or protocol change.
Basically, the user has a rule which switches an insert to a select.
They then want to run the insert, and pull the resulting tuples
from it. This works fine when using PQexec, as it returns the latest
result, which is PGRES_TUPLES_OK. However, when using the newer
PQexec family (PQexecParams and PQexecPrepared), the only thing returned
is PGRES_COMMAND_OK, which prevents the drawing of any subsequent tuples.
Can anyone think of an easy way around this (other than forcing PQexec),
and if not, is this a problem that needs fixing? It would be nice if PQexec
and PQexecParams had the exact same behavior (and ideally, returned TUPLES_OK,
even though COMMAND_OK may be more correct).
Greg Sabino Mullane email@example.com
PGP Key: 0x14964AC8 200605170839