Skip to content

Commit 11e9dcc

Browse files
author
Barry Lind
committed
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
1 parent 149f01c commit 11e9dcc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (c) 2003, PostgreSQL Global Development Group
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.13 2003/06/30 21:10:55 davec Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.14 2003/08/06 05:53:13 barry Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -131,6 +131,10 @@ public boolean next() throws SQLException
131131
String[] binds = new String[0];
132132
// Is this the correct query???
133133
String cursorName = statement.getStatementName();
134+
//if cursorName is null, we are not batching (likely because the
135+
//query itself can't be batched)
136+
if (cursorName == null)
137+
return false;
134138
sql[0] = "FETCH FORWARD " + fetchSize + " FROM " + cursorName;
135139
QueryExecutor.execute(sql,
136140
binds,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy