From: Tom Lane Date: Wed, 17 Aug 2016 19:51:11 +0000 (-0400) Subject: Fix -e option in contrib/intarray/bench/bench.pl. X-Git-Tag: REL9_2_19~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60bb1bb1224dc5c6d8dd8f5829f354ace74aba18;p=postgresql 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: --- diff --git a/contrib/intarray/bench/bench.pl b/contrib/intarray/bench/bench.pl index 8746291114..395d61655f 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];