[vhffs-dev] [1411] Connect to default database to allow admin user without db of the same name

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1411
Author:   beuss
Date:     2009-05-26 15:14:55 +0200 (Tue, 26 May 2009)

Log Message:
-----------
Connect to default database to allow admin user without db of the same name

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Robots/Pgsql.pm


Modified: trunk/vhffs-api/src/Vhffs/Robots/Pgsql.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Pgsql.pm	2009-05-26 12:08:47 UTC (rev 1410)
+++ trunk/vhffs-api/src/Vhffs/Robots/Pgsql.pm	2009-05-26 13:14:55 UTC (rev 1411)
@@ -108,11 +108,11 @@
    my $dbi;
    if( $dbhost eq "localhost" )
    {
-    $dbi = DBI->connect( "DBI:Pg:",$dbuser,$dbpass ) or return -1;
+    $dbi = DBI->connect( "DBI:Pg:dbname=postgres",$dbuser,$dbpass ) or return -1;
    }
    else
    {
-    $dbi = DBI->connect( "DBI:Pg:host=$dbhost",$dbuser,$dbpass ) or return -1;
+    $dbi = DBI->connect( "DBI:Pg:dbname=postgres;host=$dbhost",$dbuser,$dbpass ) or return -1;
    }
 
     return $dbi;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/