issues with SQL size st.execute(SQL) in 8.3.3 - Mailing list pgsql-jdbc

From Achilleas Mantzios
Subject issues with SQL size st.execute(SQL) in 8.3.3
Date
Msg-id 200810161717.17334.achill@matrix.gatewaynet.com
Whole thread Raw
Responses Re: issues with SQL size st.execute(SQL) in 8.3.3  (Kris Jurka <books@ejurka.com>)
List 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
respectivelythen 
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

pgsql-jdbc by date:

Previous
From: "Michael Nacos"
Date:
Subject: Re: COPY support in JDBC driver?
Next
From: Kris Jurka
Date:
Subject: Re: issues with SQL size st.execute(SQL) in 8.3.3