From: Tom Lane <tgl@sss.pgh.pa.us>
To: jlsanz1983@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #11822: ECPG Commit or Rollback error
Date: Wed, 29 Oct 2014 10:14:57 -0400
Message-ID: <17993.1414592097@sss.pgh.pa.us> (raw)
In-Reply-To: <20141029101320.2596.63082@wrigleys.postgresql.org>
References: <20141029101320.2596.63082@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jlsanz1983@gmail.com
Subject: Re: BUG #11822: ECPG Commit or Rollback error
In-Reply-To: <17993.1414592097@sss.pgh.pa.us>
References: <20141029101320.2596.63082@wrigleys.postgresql.org> <17993.1414592097@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox