summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/DB/Pg.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index f6a520936..9f5b67757 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -60,7 +60,8 @@ sub new {
$dbname ||= 'template1';
# construct the DSN from the parameters we got
- my $dsn = "DBI:Pg:host=$host;dbname=$dbname";
+ my $dsn = "DBI:Pg:dbname=$dbname";
+ $dsn .= ";host=$host" if $host;
$dsn .= ";port=$port" if $port;
# This stops Pg from printing out lots of "NOTICE" messages when