diff options
author | Marc G. Fournier | 1998-02-09 03:22:41 +0000 |
---|---|---|
committer | Marc G. Fournier | 1998-02-09 03:22:41 +0000 |
commit | 2535fcde2a8a56159ed90b0debc05cf3be06ac35 (patch) | |
tree | d3fed126048e4002bab9b4a9e605e180913e678a /src/interfaces/jdbc/postgresql/Connection.java | |
parent | 83e637a99a3d8adbc0a4979cdf42303bbb8c7bb7 (diff) |
From: Peter T Mount <[email protected]>
This patch fixes the following:
* Fixes minor bug found in DatabaseMetaData.getTables() where it doesn't
handle default table types.
* It now reports an error if the client opens a database using
properties, and either the user or password properties are missing. This
should make the recent problem with Servlets easier to find.
* Commented out obsolete property in Driver.getPropertyInfo()
Diffstat (limited to 'src/interfaces/jdbc/postgresql/Connection.java')
-rw-r--r-- | src/interfaces/jdbc/postgresql/Connection.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interfaces/jdbc/postgresql/Connection.java b/src/interfaces/jdbc/postgresql/Connection.java index 074a3d5579e..8dd980e2f06 100644 --- a/src/interfaces/jdbc/postgresql/Connection.java +++ b/src/interfaces/jdbc/postgresql/Connection.java @@ -139,6 +139,14 @@ public class Connection implements java.sql.Connection { //int len = STARTUP_LEN; // Length of a startup packet + // Throw an exception if the user or password properties are missing + // This occasionally occurs when the client uses the properties version + // of getConnection(), and is a common question on the email lists + if(info.getProperty("user")==null) + throw new SQLException("The user property is missing. It is mandatory."); + if(info.getProperty("password")==null) + throw new SQLException("The password property is missing. It is mandatory.") + this_driver = d; this_url = new String(url); PG_DATABASE = new String(database); |