Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Tue, 31 May 2022 08:15:27 +0000 Subject: [pgjdbc/pgjdbc] PR #2525: fix: support queries with up to 65535 (inclusive) parameters List-Id: X-GitHub-Author-Id: 213894 X-GitHub-Author-Login: vlsi X-GitHub-Issue: 2525 X-GitHub-Milestone: 42.4.0 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/2525 Content-Type: text/plain; charset=utf-8 Previously the execution failed with "Tried to send an out-of-range integer as a 2-byte value" when the user attempted executing a query with more than 32767 parameters. Technically speaking, the wire protocol limit is 2-byte-unsigned-int, so we should support 65535 parameters. In practice, simple mode (preferQueryMode=simple) allows executing queries with an arbitrary number of parameters, however, that escape hatch is not recommended as it still has limits on the SQL length, and it would likely be slow. fixes #1311