Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 23 Mar 2026 12:14:28 +0000 Subject: [pgjdbc/pgjdbc] PR #3996: fix: enable cursor-based fetching in extended protocol when transaction started via SQL command List-Id: X-GitHub-Author-Id: 213894 X-GitHub-Author-Login: vlsi X-GitHub-Issue: 3996 X-GitHub-Labels: bug X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3996 Content-Type: text/plain; charset=utf-8 When a user starts a transaction with `START TRANSACTION` or `BEGIN`SQL commands (instead of `setAutoCommit(false)`), cursor-based fetching was not activated because `PgStatement.executeInternal()` only checked `getAutoCommit()`. The server is already in a transaction block in this case, so server-side cursors will survive across fetches. The fix checks the actual server transaction state in addition to the autoCommit flag. Fixes https://github.com/pgjdbc/pgjdbc/issues/3993