From: Christoph Berg Date: Mon, 6 Jun 2016 17:03:36 +0000 (+0200) Subject: Replace $dbh->tables() with selectall_arrayref() X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=1a25cff190c0ec0628a25bca42b6a18e71051c0d;p=check_postgres.git Replace $dbh->tables() with selectall_arrayref() $dbh->tables() seems to be throwing errors in travis. Replace by a standard catalog query. t/02_commitratio.t ......... DBD::Pg::db tables failed: no statement executing at t/CP_Testing.pm line 825. Looks like your test exited with 255 before it could output anything. --- diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm index d9de296f8..0ed72874c 100644 --- a/t/CP_Testing.pm +++ b/t/CP_Testing.pm @@ -821,9 +821,9 @@ sub drop_all_tables { my $self = shift; my $dbh = $self->{dbh} || die; $dbh->{Warn} = 0; - my @info = $dbh->tables('','public','','TABLE'); - for my $tab (@info) { - $dbh->do("DROP TABLE $tab CASCADE"); + my $tables = $dbh->selectall_arrayref("SELECT tablename FROM pg_tables WHERE schemaname = 'public'"); + for my $tab (@$tables) { + $dbh->do("DROP TABLE $tab->[0] CASCADE"); } $dbh->{Warn} = 1; $dbh->commit();