Re: - Mailing list pgsql-patches

From Tom Lane
Subject Re:
Date
Msg-id 23161.1046791345@sss.pgh.pa.us
Whole thread Raw
In response to  ("bts solutions" <bts_postgresql@hotmail.com>)
List pgsql-patches
"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

pgsql-patches by date:

Previous
From: "bts solutions"
Date:
Subject:
Next
From: Bruce Momjian
Date:
Subject: Re: contrib/dbmirror