Keep the fake schema around, as we modify search_path with ALTER USER
authorGreg Sabino Mullane <[email protected]>
Tue, 5 Jul 2011 14:54:53 +0000 (10:54 -0400)
committerGreg Sabino Mullane <[email protected]>
Tue, 5 Jul 2011 14:54:53 +0000 (10:54 -0400)
t/CP_Testing.pm

index 7ef1b11529f4ea05e8f8eb585d3f9b4305c7d0af..3e79454b1100a423b2803604a17e9ff774bf62a2 100644 (file)
@@ -335,16 +335,6 @@ sub test_database_handle {
     $dbh->{AutoCommit} = 0;
     $dbh->{RaiseError} = 1;
 
-    if (! exists $self->{keep_old_schema}) {
-        $SQL = 'SELECT count(*) FROM pg_namespace WHERE nspname = ' . $dbh->quote($fakeschema);
-        my $count = $dbh->selectall_arrayref($SQL)->[0][0];
-        if ($count) {
-            $dbh->{Warn} = 0;
-            $dbh->do("DROP SCHEMA $fakeschema CASCADE");
-            $dbh->{Warn} = 1;
-        }
-    }
-
     if ($arg->{dbname} ne $self->{dbname}) {
         my $tmp_dsn = $dsn;
         $tmp_dsn =~ s/dbname=\w+/dbname=$arg->{dbname}/;