Tweak postgres connector.

This commit is contained in:
Taylor Otwell
2013-01-05 16:22:32 -06:00
parent f948801369
commit 23bdbd0834

View File

@@ -24,7 +24,9 @@ class Postgres extends Connector {
{
extract($config);
$dsn = "pgsql:host={$host};dbname={$database}";
$host_dsn = isset($host) ? 'host='.$host.';' : '';
$dsn = "pgsql:{$host_dsn}dbname={$database}";
// The developer has the freedom of specifying a port for the PostgresSQL
// database or the default port (5432) will be used by PDO to create the