Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Query parameter...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 1934 of 1984
Post > Topic >>

Query parameters limit in postgres jdbc driver?

by olafoos@[EMAIL PROTECTED] (olafos) Apr 23, 2008 at 12:12 AM

Hi,

I'm using Toplink JPA with Postgresql JDBC driver in my application and I
encountered the following problem. I'm creating a query with IN clause
containing a couple of thousand of parameters. When the query is sent to
the
jdbc driver the following error occurs:

Local Exception Stack: 
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build 09d
(12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: An I/O error
occured
while sending to the backend.
Error Code: 0
	...
Caused by: org.postgresql.util.PSQLException: An I/O error occured while
sending to the backend.
	at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:217)
	at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
	at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
	at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
	at
oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:726)
	at
oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:501)
	... 40 more
Caused by: java.io.IOException: Tried to send an out-of-range integer as a
2-byte value: 40000
	at org.postgresql.core.PGStream.SendInteger2(PGStream.java:194)
	at
org.postgresql.core.v3.QueryExecutorImpl.sendParse(QueryExecutorImpl.java:769)
	at
org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1036)
	at
org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:643)
	at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:189)
	... 45 more

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?

Thanks,
Olaf Tomcak



-- 
View this message in context:
http://www.nabble.com/Query-parameters-limit-in-postgres-jdbc-driver--tp16832734p16832734.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 3 Posts in Topic:
Query parameters limit in postgres jdbc driver?
olafoos@[EMAIL PROTECTED]  2008-04-23 00:12:45 
Re: Query parameters limit in postgres jdbc driver?
tgl@[EMAIL PROTECTED] (T  2008-04-23 10:17:18 
Re: Query parameters limit in postgres jdbc driver?
olafoos@[EMAIL PROTECTED]  2008-04-23 21:28:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 18:48:13 CDT 2008.