| From: | Vladimir Sitnikov <noreply(at)github(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
| Subject: | [pgjdbc/pgjdbc] 6c0c5d: fix: support queries with up to 65535 (inclusive) ... |
| Date: | 2022-06-01 15:41:59 |
| Message-ID: | pgjdbc/pgjdbc/push/refs/heads/master/82dbbe-6c0c5d@github.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 6c0c5da4075960e1dffa91480fb8b3a4932f8e1b
https://github.com/pgjdbc/pgjdbc/commit/6c0c5da4075960e1dffa91480fb8b3a4932f8e1b
Author: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Date: 2022-06-01 (Wed, 01 Jun 2022)
Changed paths:
M CHANGELOG.md
M pgjdbc/src/main/java/org/postgresql/core/PGStream.java
M pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/BatchedInsertReWriteEnabledTest.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc42/PreparedStatement64KBindsTest.java
Log Message:
-----------
fix: support queries with up to 65535 (inclusive) parameters
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vladimir Sitnikov | 2022-06-01 18:06:53 | [pgjdbc/pgjdbc] 9432e4: chore: update S3 build cache region |
| Previous Message | Vladimir Sitnikov | 2022-06-01 14:24:23 | [pgjdbc/pgjdbc] ee9c60: test: shorten test description in UTF8EncodingTest |