pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: qinarmy-zoro (@qinarmy-zoro) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3993: fix Enable cursor-based bug, when start transaction by 'START TRANSAC'
Date: Mon, 23 Mar 2026 10:54:20 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
> > I suppose not, but if you aren't going to use the API, why would you expect the rest of the API to work ?
>
> Why can't I use the START TRANSACTION command while using a cursor? Does PostgreSQL prohibit me from using it?
>
> Is it unreasonable to add a single line of code just to check if the current connection is inside a database transaction block?
It is incorrect to judge the transactional state of a connection using only getAutoCommit(), as it is unreliable. The accurate approach is to verify if connection.getQueryExecutor().getTransactionState() == TransactionState.OPEN
view thread (8+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #3993: fix Enable cursor-based bug, when start transaction by 'START TRANSAC'
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox