pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Bug in intarray bench script 3+ messages / 3 participants [nested] [flat]
* Bug in intarray bench script @ 2016-05-17 09:18 Daniel Gustafsson <daniel@yesql.se> 2016-05-24 19:35 ` Re: Bug in intarray bench script Andreas 'ads' Scherbaum <ads@pgug.de> 0 siblings, 1 reply; 3+ messages in thread From: Daniel Gustafsson @ 2016-05-17 09:18 UTC (permalink / raw) To: pgsql-hackers In the contrib/intarray benchmarking script bench.pl, the -e option to print the plan via EXPLAIN is using the DBI do() method which discards output resulting in nothing being printed. Judging by the usage help (“show explain”) I assume the intention is to print the plan to STDOUT when invoked (which is exactly what I wanted in this case, thus bumping into this) but at least on recent DBI/DBD::Pg versions the do() method is not returning the rows. Attached patch use the selectall_arrayref() method instead and output the plan when -e is invoked. cheers ./daniel -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers Attachments:^ permalink raw reply [nested|flat] 3+ messages in threadintarray_bench.diff (application/octet-stream, 389B) download
diff --git a/contrib/intarray/bench/bench.pl b/contrib/intarray/bench/bench.pl index 8746291..395d616 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];
* Re: Bug in intarray bench script 2016-05-17 09:18 Bug in intarray bench script Daniel Gustafsson <daniel@yesql.se> @ 2016-05-24 19:35 ` Andreas 'ads' Scherbaum <ads@pgug.de> 2016-08-17 19:52 ` Re: Bug in intarray bench script Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 3+ messages in thread From: Andreas 'ads' Scherbaum @ 2016-05-24 19:35 UTC (permalink / raw) To: pgsql-hackers; +Cc: Daniel Gustafsson <daniel@yesql.se> The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation: not tested The patch changes the benchmark tool in a way that the explain output is printed to standard out - what one would expect from the "-e" (explain) option. The new status of this patch is: Ready for Committer -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Bug in intarray bench script 2016-05-17 09:18 Bug in intarray bench script Daniel Gustafsson <daniel@yesql.se> 2016-05-24 19:35 ` Re: Bug in intarray bench script Andreas 'ads' Scherbaum <ads@pgug.de> @ 2016-08-17 19:52 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2016-08-17 19:52 UTC (permalink / raw) To: Andreas 'ads' Scherbaum <ads@pgug.de>; +Cc: pgsql-hackers; Daniel Gustafsson <daniel@yesql.se> "Andreas 'ads' Scherbaum" <ads@pgug.de> writes: > The patch changes the benchmark tool in a way that the explain output is printed to standard out - what one would expect from the "-e" (explain) option. > The new status of this patch is: Ready for Committer Pushed, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2016-08-17 19:52 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-05-17 09:18 Bug in intarray bench script Daniel Gustafsson <daniel@yesql.se> 2016-05-24 19:35 ` Andreas 'ads' Scherbaum <ads@pgug.de> 2016-08-17 19:52 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox