aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2002-03-27 05:33:27 +0000
committerBarry Lind <barry@xythos.com>2002-03-27 05:33:27 +0000
commit2442e79e3276a6c4f29e5a415858c7a487ec18b2 (patch)
tree7dc71fd0f8a2ef8ef70ed9c00400b9dbd9c76fa2 /src
parente68eb63e8cca8ebe7516b528f82c9e673fa4d230 (diff)
downloadpostgresql-2442e79e3276a6c4f29e5a415858c7a487ec18b2.tar.gz
postgresql-2442e79e3276a6c4f29e5a415858c7a487ec18b2.zip
applied patch from Liam Stewart fixing a message in the properties file
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)
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/jdbc/org/postgresql/errors.properties9
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java3
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java3
3 files changed, 11 insertions, 4 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/errors.properties b/src/interfaces/jdbc/org/postgresql/errors.properties
index 7c5b32eb3f1..eebe2d7d867 100644
--- a/src/interfaces/jdbc/org/postgresql/errors.properties
+++ b/src/interfaces/jdbc/org/postgresql/errors.properties
@@ -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.
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
index 02a5195b954..84a7dc3f9fa 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
@@ -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);
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
index d9e37035ee5..20c68016ca8 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
@@ -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);