Author: turnstep
Date: Tue Jul 1 08:01:15 2008
New Revision: 11472
Modified:
DBD-Pg/trunk/t/dbdpg_test_setup.pl
Log:
More goto fun: if we have a permission error, try the initdb route.
Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl (original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl Tue Jul 1 08:01:15 2008
@@ -213,6 +213,7 @@
return $helpconnect, '', undef;
}
+ INITDB:
my ($info,$testport);
$helpconnect = 16;
@@ -460,6 +461,10 @@
eval {
$dbh->do("CREATE SCHEMA $S");
};
+ if ($@ =~ /Permission denied/ and $helpconnect != 16) {
+ ## Okay, this ain't gonna work, let's try initdb
+ goto INITDB;
+ }
$@ and return $helpconnect, $@, undef;
$dbh->do("SET search_path TO $S");
$dbh->do('CREATE SEQUENCE dbd_pg_testsequence');
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.