BUGFIX Using dbname=postgres in PostgreSQLDatabaseConfigurationHelper to enable configuration checks with users other than 'postgres' (that might not have a database with their username)

This commit is contained in:
Ingo Schommer 2010-03-26 02:32:04 +00:00
parent b12b5f0e31
commit 77b972bfb5

View File

@ -34,7 +34,7 @@ class PostgreSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelp
$server = $databaseConfig['server'];
$userPart = $username ? " user=$username" : '';
$passwordPart = $password ? " password=$password" : '';
$connstring = "host=$server port=5432 {$userPart}{$passwordPart}";
$connstring = "host=$server port=5432 dbname=postgres {$userPart}{$passwordPart}";
$conn = @pg_connect($connstring);
if($conn) {
@ -63,7 +63,7 @@ class PostgreSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelp
$server = $databaseConfig['server'];
$userPart = $username ? " user=$username" : '';
$passwordPart = $password ? " password=$password" : '';
$connstring = "host=$server port=5432 {$userPart}{$passwordPart}";
$connstring = "host=$server port=5432 dbname=postgres {$userPart}{$passwordPart}";
$conn = @pg_connect($connstring);
if($conn) {