"bts solutions" <bts_postgresql@hotmail.com> writes:
> We have implemented use of cursor in psql.
> + results =3D PQexec(pset.db, "begin work");
> + own_work =3D PQresultStatus(results) =3D=3D PGRES_COMMAND_OK;
I do not believe this works for the case where one is already inside a
transaction block. BEGIN will not report an error, so you'll end up
improperly issuing a COMMIT.
More generally, I'm not happy with having psql issue substantially
different SQL commands than what I gave it. I think it should be the
application's business to use a cursor, not psql's.
regards, tom lane