You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/interfaces/jdbc/postgresql/Connection.java
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
importpostgresql.util.*;
11
11
12
12
/**
13
-
* $Id: Connection.java,v 1.16 1999/05/17 22:43:23 peter Exp $
13
+
* $Id: Connection.java,v 1.17 1999/05/18 23:17:15 peter Exp $
14
14
*
15
15
* This abstract class is used by postgresql.Driver to open either the JDBC1 or
16
16
* JDBC2 versions of the Connection class.
@@ -95,9 +95,9 @@ protected void openConnection(String host, int port, Properties info, String dat
95
95
// This occasionally occurs when the client uses the properties version
96
96
// of getConnection(), and is a common question on the email lists
97
97
if(info.getProperty("user")==null)
98
-
thrownewSQLException("The user property is missing. It is mandatory.");
98
+
thrownewPSQLException("postgresql.con.user");
99
99
if(info.getProperty("password")==null)
100
-
thrownewSQLException("The password property is missing. It is mandatory.");
100
+
thrownewPSQLException("postgresql.con.pass");
101
101
102
102
this_driver = d;
103
103
this_url = newString(url);
@@ -116,9 +116,9 @@ protected void openConnection(String host, int port, Properties info, String dat
116
116
// Added by Peter Mount <peter@retep.org.uk>
117
117
// ConnectException is thrown when the connection cannot be made.
118
118
// we trap this an return a more meaningful message for the end user
119
-
thrownewSQLException ("Connection refused. Check that the hostname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP networking.");
// Now we need to construct and send a startup packet
@@ -173,11 +173,11 @@ protected void openConnection(String host, int port, Properties info, String dat
173
173
174
174
caseAUTH_REQ_KRB4:
175
175
DriverManager.println("postgresql: KRB4");
176
-
thrownewSQLException("Kerberos 4 not supported");
176
+
thrownewPSQLException("postgresql.con.kerb4");
177
177
178
178
caseAUTH_REQ_KRB5:
179
179
DriverManager.println("postgresql: KRB5");
180
-
thrownewSQLException("Kerberos 5 not supported");
180
+
thrownewPSQLException("postgresql.con.kerb5");
181
181
182
182
caseAUTH_REQ_PASSWORD:
183
183
DriverManager.println("postgresql: PASSWORD");
@@ -197,17 +197,17 @@ protected void openConnection(String host, int port, Properties info, String dat
197
197
break;
198
198
199
199
default:
200
-
thrownewSQLException("Authentication type "+areq+" not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or Subnet, and is using a supported authentication scheme.");
//throw new SQLException("The postgresql.jar file does not contain the correct JDBC classes for this JVM. Try rebuilding.\nException thrown was "+ex.toString());
113
107
} catch(Exceptionex2) {
114
108
thrownewPSQLException("postgresql.unusual",ex2);
115
-
//throw new SQLException("Something unusual has occured to cause the driver to fail. Please report this exception: "+ex2.toString());
116
109
}
117
110
// The old call - remove before posting
118
111
//return new Connection (host(), port(), props, database(), url, this);
@@ -356,7 +349,6 @@ public String property(String name)
postgresql.con.auth:The authentication type {1} 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.
3
+
postgresql.con.authfail:An error occured while getting the authentication request.
4
+
postgresql.con.call:Callable Statements are not supported at this time.
5
+
postgresql.con.creobj:Failed to create object for {1} {2}
6
+
postgresql.con.failed:The connection attempt failed because {1}
7
+
postgresql.con.fathom:Unable to fathom update count {1}
8
+
postgresql.con.garbled:Garbled data received.
9
+
postgresql.con.ioerror:An IO erro occured while sending to the backend - {1}
10
+
postgresql.con.kerb4:Kerberos 4 authentication is not supported by this driver.
11
+
postgresql.con.kerb5:Kerberos 5 authentication is not supported by this driver.
12
+
postgresql.con.multres:Cannot handle multiple result groups.
13
+
postgresql.con.pass:The password property is missing. It is mandatory.
14
+
postgresql.con.refused:Connection refused. Check that the hostname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP networking.
15
+
postgresql.con.strobj:The object could not be stored. Check that any tables required have already been created in the database.
16
+
postgresql.con.strobjex:Failed to store object - {1}
17
+
postgresql.con.toolong:The SQL Statement is too long - {1}
18
+
postgresql.con.tuple:Tuple received before MetaData.
19
+
postgresql.con.type:Unknown Response Type {1}
20
+
postgresql.con.user:The user property is missing. It is mandatory.
21
+
postgresql.fp.error:FastPath call returned {1}
22
+
postgresql.fp.expint:Fastpath call {1} - No result was returned and we expected an integer.
0 commit comments