Re: Query parameters limit in postgres jdbc driver?

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

Tom Lane writes:
> 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
>
>
>

Yeah, well that would be much more sensible I guess, although it won't
be easy to convince Toplink to do so;). Anyway, thanks a lot for
clearing this up for me.

regards, Olaf Tomczak

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Max Pyziur 2008-04-23 19:51:27 Taking a date from the command line
Previous Message Craig Ringer 2008-04-23 17:00:51 Re: Creating a sequence