aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2003-08-06 05:53:13 +0000
committerBarry Lind <barry@xythos.com>2003-08-06 05:53:13 +0000
commit11e9dcc5499b2cc709063ccce33eab07da7ac769 (patch)
treec493fd01bc39a9317e1b79538f49be3c87fe5880 /src
parent149f01c4d463744cd2fe504f017422bbb9e5440e (diff)
downloadpostgresql-11e9dcc5499b2cc709063ccce33eab07da7ac769.tar.gz
postgresql-11e9dcc5499b2cc709063ccce33eab07da7ac769.zip
Applied patch from kho@redhat.com to fix a problem with trying to use a fetch
when a cursor wasn't being used. Modified Files: jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
index 5f10f110461..c314b77d65a 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
@@ -9,7 +9,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.13 2003/06/30 21:10:55 davec Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.14 2003/08/06 05:53:13 barry Exp $
*
*-------------------------------------------------------------------------
*/
@@ -131,6 +131,10 @@ public abstract class AbstractJdbc1ResultSet implements BaseResultSet
String[] binds = new String[0];
// Is this the correct query???
String cursorName = statement.getStatementName();
+ //if cursorName is null, we are not batching (likely because the
+ //query itself can't be batched)
+ if (cursorName == null)
+ return false;
sql[0] = "FETCH FORWARD " + fetchSize + " FROM " + cursorName;
QueryExecutor.execute(sql,
binds,