Index: org/postgresql/jdbc1/AbstractJdbc1ResultSet.java =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java,v retrieving revision 1.13 diff -c -p -r1.13 AbstractJdbc1ResultSet.java *** org/postgresql/jdbc1/AbstractJdbc1ResultSet.java 30 Jun 2003 21:10:55 -0000 1.13 --- org/postgresql/jdbc1/AbstractJdbc1ResultSet.java 5 Aug 2003 21:44:14 -0000 *************** public abstract class AbstractJdbc1Resul *** 123,128 **** --- 123,135 ---- // Must be false if we weren't batching. if (fetchSize == 0) return false; + // We may have ignored fetchSize because we are not using + // server side prepared statements and we are not in a + // transaction so we cannot declare a cursor; in this cases + // the statement name is null and we've already got all the data + String cursorName = statement.getStatementName(); + if (cursorName == null) + return false; // Use the ref to the statement to get // the details we need to do another cursor // query - it will use reinit() to repopulate this *************** public abstract class AbstractJdbc1Resul *** 130,136 **** String[] sql = new String[1]; String[] binds = new String[0]; // Is this the correct query??? - String cursorName = statement.getStatementName(); sql[0] = "FETCH FORWARD " + fetchSize + " FROM " + cursorName; QueryExecutor.execute(sql, binds, --- 137,142 ----