Re: BUG #11822: ECPG Commit or Rollback error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jlsanz1983(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11822: ECPG Commit or Rollback error
Date: 2014-10-29 14:14:57
Message-ID: 17993.1414592097@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

jlsanz1983(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message skeefe 2014-10-29 19:27:58 BUG #11824: Postgres Restoring the same file multiple times
Previous Message Heikki Linnakangas 2014-10-29 12:45:25 Re: BUG #11455: PQerrorMessage not reset after PQreset