1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

Added a check for not calling next() before getting objects from the result set,

moved the check for columnIndex into same call
check at the top of all getXXX
added appropriate error
This commit is contained in:
Dave Cramer
2002-03-09 17:36:14 +00:00
parent c422b5ca6b
commit ee2154829e
4 changed files with 18 additions and 14 deletions

View File

@ -255,5 +255,10 @@ public abstract class ResultSet
else
this.warnings = warnings;
}
protected void checkResultSet( int column ) throws SQLException
{
if ( this_row == null ) throw new PSQLException("postgresql.res.nextrequired");
if ( column < 1 || column > fields.length ) throw new PSQLException("postgresql.res.colrange" );
}
}