PG Bug reporting form <noreply@postgresql.org> writes:
> While I was writing test cases for the hold cursor, I unexpectedly
> discovered that commit and rollback handle it inconsistently—rollback
> unexpectedly releases the hold cursor. Should this be regarded as a bug?
No, that's intentional. The rollback might be cleaning up a failure
in the held cursor.
regards, tom lane