Skip site navigation (1) Skip section navigation (2)

issues with SQL size st.execute(SQL) in 8.3.3

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: issues with SQL size st.execute(SQL) in 8.3.3
Date: 2008-10-16 14:17:16
Message-ID: 200810161717.17334.achill@matrix.gatewaynet.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi,
i am experiencing the following situation with 8.3.3 backend and postgresql-8.3-603.jdbc3.jar driver.
In a simple program such as shown below i try to execute a rather large SQL worth of 2.5 MBytes:
.....
			FileReader fr = new FileReader(file);
			BufferedReader br = new BufferedReader(fr);
			String SQL="";
			String line;
			while ((line=br.readLine()) != null) {
				SQL += line;
			}
			Statement st = con.createStatement();
			st.execute(SQL);
.......

i noticed that when i run the above program against postgresql 7.4.2 (with the contrib stock jdbc driver) the above 
program executes and ends successfully.
However when i try to run it against 8.3.3 server and postgresql-8.3-603.jdbc3.jar driver, it seems to stall at a statement
which is located somewhere around 1.5 MByte offset. If i split the SQL file into two parts 1.5Mbytes and 1Mbyte respectively then
the above program runs fine.
Experimenting i found out that a file of 1623377 bytes would rather be executed (i think it is not deterministic when it
comes to file sizes), while a file of 1635008 would stall.
Can somebody think of anything about this (change of) behaviour?
Any way to by pass this in 8.3 without resorting to drastically change one's architecture?

Thanx

-- 
Achilleas Mantzios

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2008-10-16 19:04:33
Subject: Re: issues with SQL size st.execute(SQL) in 8.3.3
Previous:From: Michael NacosDate: 2008-10-16 09:13:55
Subject: Re: COPY support in JDBC driver?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group