diff options
author | Barry Lind <barry@xythos.com> | 2003-09-09 10:49:16 +0000 |
---|---|---|
committer | Barry Lind <barry@xythos.com> | 2003-09-09 10:49:16 +0000 |
commit | 5cdf771d8a457273e7eb62c097f23f65082abe8f (patch) | |
tree | 4bb9afe6165fcad05fe40642d3d899e35d170a2f /src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java | |
parent | fcdf0e22fcac4724c67bac18706d5c50931aa02d (diff) | |
download | postgresql-5cdf771d8a457273e7eb62c097f23f65082abe8f.tar.gz |
Additional SQLState work for JDBC - thanks to Kim Ho at Redhat for input on this
Modified Files:
jdbc/build.xml jdbc/org/postgresql/core/QueryExecutor.java
jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
jdbc/org/postgresql/util/PSQLState.java
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java index ba9acb9e5a..34a0f3596e 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java @@ -9,7 +9,7 @@ * Copyright (c) 2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.24 2003/09/08 17:30:22 barry Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.25 2003/09/09 10:49:16 barry Exp $ * *------------------------------------------------------------------------- */ @@ -252,7 +252,7 @@ public abstract class AbstractJdbc1Connection implements BaseConnection case 'N': // Server does not support ssl - throw new PSQLException("postgresql.con.sslnotsupported"); + throw new PSQLException("postgresql.con.sslnotsupported", PSQLState.CONNECTION_FAILURE); case 'S': // Server supports ssl @@ -262,7 +262,7 @@ public abstract class AbstractJdbc1Connection implements BaseConnection break; default: - throw new PSQLException("postgresql.con.sslfail"); + throw new PSQLException("postgresql.con.sslfail", PSQLState.CONNECTION_FAILURE); } } } @@ -559,7 +559,7 @@ public abstract class AbstractJdbc1Connection implements BaseConnection case 'N': // Server does not support ssl - throw new PSQLException("postgresql.con.sslnotsupported"); + throw new PSQLException("postgresql.con.sslnotsupported", PSQLState.CONNECTION_FAILURE); case 'S': // Server supports ssl @@ -569,7 +569,7 @@ public abstract class AbstractJdbc1Connection implements BaseConnection break; default: - throw new PSQLException("postgresql.con.sslfail"); + throw new PSQLException("postgresql.con.sslfail", PSQLState.CONNECTION_FAILURE); } } } @@ -1610,7 +1610,7 @@ public abstract class AbstractJdbc1Connection implements BaseConnection } BaseResultSet result = execSQL(sql); if (result.getColumnCount() != 1 || result.getTupleCount() != 1) { - throw new PSQLException("postgresql.unexpected"); + throw new PSQLException("postgresql.unexpected", PSQLState.UNEXPECTED_ERROR); } result.next(); pgType = result.getString(1); @@ -1651,7 +1651,7 @@ public abstract class AbstractJdbc1Connection implements BaseConnection } BaseResultSet result = execSQL(sql); if (result.getColumnCount() != 1 || result.getTupleCount() != 1) - throw new PSQLException("postgresql.unexpected"); + throw new PSQLException("postgresql.unexpected", PSQLState.UNEXPECTED_ERROR); result.next(); oid = Integer.parseInt(result.getString(1)); typeOidCache.put(typeName, new Integer(oid)); |