mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
From: Peter T Mount <patches@maidast.demon.co.uk>
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()
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user