mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
When positioned before the start of a ResultSet issuing relative(0)
results in an exception being thrown when it really should be a no-op.
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
* Copyright (c) 2003, PostgreSQL Global Development Group
|
* Copyright (c) 2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.25.2.9 2004/09/13 07:14:26 jurka Exp $
|
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.25.2.10 2005/04/18 18:25:11 jurka Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -176,8 +176,10 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
|
|||||||
// index is 1-based, but internally we use 0-based indices
|
// index is 1-based, but internally we use 0-based indices
|
||||||
int internalIndex;
|
int internalIndex;
|
||||||
|
|
||||||
if (index == 0)
|
if (index == 0) {
|
||||||
throw new SQLException("Cannot move to index of 0");
|
beforeFirst();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
final int rows_size = rows.size();
|
final int rows_size = rows.size();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user