Re: BUG #11822: ECPG Commit or Rollback error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #11822: ECPG Commit or Rollback error
Дата
Msg-id 17993.1414592097@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #11822: ECPG Commit or Rollback error  (jlsanz1983@gmail.com)
Список pgsql-bugs
jlsanz1983@gmail.com writes:
> Hi when a cursor is open and a fetch is in progres if then uses a commit or
> rollback instruction before close the cursor.
> The cursor get this error:
> sqlerrm.sqlerrmc: cursor "bolas" does not exist on line 141
> If the commit goes after close the cursor then the execution doesn't return
> any error.

That sounds like expected behavior to me: ordinary cursors are
automatically closed at transaction end.

If you really need this to work, you can declare the cursor WITH HOLD,
but that entails a performance penalty.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: jlsanz1983@gmail.com
Дата:
Сообщение: BUG #11822: ECPG Commit or Rollback error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done