]> granicus.if.org Git - postgresql/commitdiff
applied patch from Liam Stewart fixing a message in the properties file
authorBarry Lind <barry@xythos.com>
Wed, 27 Mar 2002 05:33:27 +0000 (05:33 +0000)
committerBarry Lind <barry@xythos.com>
Wed, 27 Mar 2002 05:33:27 +0000 (05:33 +0000)
also fixed a NPE when calling the next() method on a result set after the
connection or resultset has been closed. (bug reported by Hans Deragon)

src/interfaces/jdbc/org/postgresql/errors.properties
src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java

index 7c5b32eb3f1d254973cffc9e59fffe3434906a61..eebe2d7d867939b86c3f000e71af86efa23bdc00 100644 (file)
@@ -3,7 +3,7 @@ postgresql.arr.range:The array index is out of range.
 postgresql.drv.version:An internal error has occured. Please recompile the driver.
 postgresql.con.auth:The authentication type {0} is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or Subnet, and that it is using an authentication scheme supported by the driver.
 postgresql.con.authfail:An error occured while getting the authentication request.
-postgresql.con.backend:Backend start-up failed: {0}.
+postgresql.con.backend:Backend start-up failed: {0}
 postgresql.con.call:Callable Statements are not supported at this time.
 postgresql.con.creobj:Failed to create object for {0} {1}
 postgresql.con.failed:The connection attempt failed because {0}
@@ -38,12 +38,12 @@ postgresql.geo.point:Conversion of point failed - {0}
 postgresql.jvm.version:The postgresql.jar file does not contain the correct JDBC classes for this JVM. Try rebuilding. If that fails, try forcing the version supplying it to the command line using the argument -Djava.version=1.1 or -Djava.version=1.2\nException thrown was {0}
 postgresql.lo.init:failed to initialise LargeObject API
 postgresql.metadata.unavailable:Metadata unavailable.
-postgresql.money:conversion of money failed - {0}.
+postgresql.money:conversion of money failed - {0}
 postgresql.noupdate:This ResultSet is not updateable.
 postgresql.notsensitive:This ResultSet is not sensitive to realtime updates after the query has run.
 postgresql.psqlnotimp:The backend currently does not support this feature.
 postgresql.prep.is:InputStream as parameter not supported
-postgresql.prep.param:No value specified for parameter {0}.
+postgresql.prep.param:No value specified for parameter {0}
 postgresql.prep.range:Parameter index out of range.
 postgresql.prep.type:Unknown Types value.
 postgresql.res.badbigdec:Bad BigDecimal {0}
@@ -56,12 +56,13 @@ postgresql.res.badlong:Bad Long {0}
 postgresql.res.badshort:Bad Short {0}
 postgresql.res.badtime:Bad Time {0}
 postgresql.res.badtimestamp:Bad Timestamp Format at {0} in {1}
+postgresql.res.closed:Result set is closed.  Operation is not permitted.
 postgresql.res.colname:The column name {0} not found.
 postgresql.res.colrange:The column index is out of range.
 postgresql.res.nextrequired:Result set not positioned properly, perhaps you need to call next().
 postgresql.serial.interface:You cannot serialize an interface.
 postgresql.serial.namelength:Class & Package name length cannot be longer than 32 characters. {0} is {1} characters.
-postgresql.serial.noclass:No class found for {0}.
+postgresql.serial.noclass:No class found for {0}
 postgresql.serial.table:The table for {0} is not in the database. Contact the DBA, as the database is in an inconsistent state.
 postgresql.serial.underscore:Class names may not have _ in them. You supplied {0}.
 postgresql.stat.batch.error:Batch entry {0} {1} was aborted.
index 02a5195b9545c645312250328fb4bfb45a5b259b..84a7dc3f9fad0ec066987062d2f0b236a2579cba 100644 (file)
@@ -106,6 +106,9 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
         */
        public boolean next() throws SQLException
        {
+           if (rows == null)
+               throw new PSQLException("postgresql.con.closed");
                if (++current_row >= rows.size())
                        return false;
                this_row = (byte [][])rows.elementAt(current_row);
index d9e37035ee5c96e5bfee5dd55bc3704f07673bdb..20c68016ca821e0a3f93d0568c3e526b874d75db 100644 (file)
@@ -110,6 +110,9 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
         */
        public boolean next() throws SQLException
        {
+           if (rows == null)
+               throw new PSQLException("postgresql.con.closed");
+
                if (++current_row >= rows.size())
                        return false;
                this_row = (byte [][])rows.elementAt(current_row);