diff -u b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php --- b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php @@ -211,7 +211,7 @@ try { // Create the database and set it as active. - $this->exec("CREATE DATABASE $database WITH TEMPLATE template0 ENCODING='utf8' LC_CTYPE='$locale.utf8' LC_COLLATE='$locale.utf8'"); + $this->connection->exec("CREATE DATABASE $database WITH TEMPLATE template0 ENCODING='utf8' LC_CTYPE='$locale.utf8' LC_COLLATE='$locale.utf8'"); } catch (\Exception $e) { throw new DatabaseNotFoundException($e->getMessage()); diff -u b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php --- b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php @@ -83,7 +83,7 @@ // database name is valid for creation. $create_database = Database::getConnection()->escapeDatabase($database); if ($create_database != $database) { - $this->fail(st("Database %database not found. The database also can't be created because in the name only alphanumeric characters and underscores are allowed.", array('%database' => $database))); + $this->fail(t("Database %database not found. The database also can't be created because in the name only alphanumeric characters and underscores are allowed.", array('%database' => $database))); return FALSE; } // If it is, attempt to create the database.