Re: Query parameters limit in postgres jdbc driver?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: olafos <olafoos(at)wp(dot)pl>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Query parameters limit in postgres jdbc driver?
Date: 2008-04-23 14:17:18
Message-ID: 10218.1208960238@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

olafos <olafoos(at)wp(dot)pl> writes:
> Seems like the driver is trying to send the number 40,000 (which is actually
> the number of query parameters) as a 2-byte integer. Is there any limit to
> the number of jdbc query parameters in postgresql?

Yeah, 2^16, as you already noticed.

40000 parameters is far beyond the bounds of sanity anyway. Try sending
them as a single array parameter, ie "foo = any (?::int[])"

regards, tom lane

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2008-04-23 15:00:44 Re: Creating a sequence
Previous Message Chris 2008-04-23 13:46:10 Creating a sequence