Re:

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re:
Дата
Msg-id 23161.1046791345@sss.pgh.pa.us
обсуждение исходный текст
Ответ на  ("bts solutions" <bts_postgresql@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "bts solutions"
Дата:
Сообщение:
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: contrib/dbmirror