Re: JDBC prepared statement: a 32767 limit of arguments number - Mailing list pgsql-jdbc

From David G. Johnston
Subject Re: JDBC prepared statement: a 32767 limit of arguments number
Date
Msg-id CAKFQuwa69nCWZmm=wwLMd2Wwr9m36uYDU0BbwfVTOV-0h0+esw@mail.gmail.com
Whole thread Raw
Responses Re: JDBC prepared statement: a 32767 limit of arguments number  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
On Wednesday, March 9, 2022, Vladislav Malyshkin <mal@gromco.com> wrote:
Currently postgres JDBC driver has a  32767 limit for the number of prepared statement arguments, see e.g.
https://luppeng.wordpress.com/2020/05/20/postgresql-jdbc-driver-upper-limit-on-parameters-in-preparedstatement/
Can this limit be lifted. There is no any such a limit in JDBC spec.

There is little motivation to try since if you approach that limit you should probably write your query differently anyway - like using a temp table and a join instead of an IN operator.

David H.

pgsql-jdbc by date:

Previous
From: TAKATSUKA Haruka
Date:
Subject: Re: Security Release announcement versions 42.2.25 and 42.3.2 have been released
Next
From: Tom Lane
Date:
Subject: Re: JDBC prepared statement: a 32767 limit of arguments number