8000 Fix -e option in contrib/intarray/bench/bench.pl. · paul-guo-/postgres@9942376 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9942376

Browse files
committed
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>
1 parent 7e01c8e commit 9942376

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/intarray/bench/bench.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
}
7171

7272
if ( $opt{e} ) {
73-
$dbi->do("explain $sql");
73+
my @plan = map { "$_->[0]\n" } @{$dbi->selectall_arrayref("explain $sql")};
74+
print @plan;
7475
}
7576

7677
my $t0 = [gettimeofday];

0 commit comments

Comments
 (0)
0