//// Anything else defaults to trust authentication
//STARTUP_CODE=STARTUP_USER;
//}
// Now make the initial connection
// Now make the initial connection
try
try
{
{
pg_stream=newPG_Stream(host,port);
pg_stream=newPG_Stream(host,port);
}catch(ConnectExceptioncex){
// Added by Peter Mount <peter@retep.org.uk>
// ConnectException is thrown when the connection cannot be made.
// we trap this an return a more meaningful message for the end user
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.");
thrownewSQLException("Authentication type "+areq+" not supported");
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.");
}
}
break;
break;
...
@@ -511,7 +473,9 @@ public class Connection implements java.sql.Connection
...
@@ -511,7 +473,9 @@ public class Connection implements java.sql.Connection