summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-08-17 15:51:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-08-17 15:51:10 -0400
commitd715b76d12fa516370ce0b56a708fe1521605b66 (patch)
treebcd0abedcce444ae71e6cd562a935dd1dcd06c35
parent9b33c7e80d5ac9d85cbb9330f172a5e606876b1c (diff)
Fix -e option in contrib/intarray/bench/bench.pl.
As implemented, -e ran an EXPLAIN but then discarded the output, which certainly seems pointless. Make it print to stdout instead. It's been like that forever, so back-patch to all supported branches. Daniel Gustafsson, reviewed by Andreas Scherbaum Patch: <B97BDCB7-A3B3-4734-90B5-EDD586941629@yesql.se>
-rwxr-xr-xcontrib/intarray/bench/bench.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/intarray/bench/bench.pl b/contrib/intarray/bench/bench.pl
index 87462911147..395d61655f2 100755
--- a/contrib/intarray/bench/bench.pl
+++ b/contrib/intarray/bench/bench.pl
@@ -92,7 +92,8 @@ if ($opt{v})
if ($opt{e})
{
- $dbi->do("explain $sql");
+ my @plan = map { "$_->[0]\n" } @{$dbi->selectall_arrayref("explain $sql")};
+ print @plan;
}
my $t0 = [gettimeofday];