From e145b84b7c5cfc851db0a880928d6ddf6285cbdc Mon Sep 17 00:00:00 2001 From: Chris Graham Date: Tue, 29 Oct 2019 11:41:26 -0600 Subject: [PATCH] Updated PDO PostgreSQL Connection Creation In addition to the pre-check for PostgreSQL needing to use pgsql as the module name, the connection generator helper also needed to be updated. --- code/PostgreSQLDatabaseConfigurationHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/PostgreSQLDatabaseConfigurationHelper.php b/code/PostgreSQLDatabaseConfigurationHelper.php index 235de3d..f50110a 100644 --- a/code/PostgreSQLDatabaseConfigurationHelper.php +++ b/code/PostgreSQLDatabaseConfigurationHelper.php @@ -42,7 +42,7 @@ class PostgreSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelp break; case 'PostgrePDODatabase': // May throw a PDOException if fails - $conn = @new PDO('postgresql:host='.$server.';dbname=postgres;port=5432', $username, $password); + $conn = @new PDO('pgsql:host='.$server.';dbname=postgres;port=5432', $username, $password); break; default: $error = 'Invalid connection type: ' . $databaseConfig['type'];