Bug in intarray bench script

Started by Daniel Gustafssonalmost 10 years ago3 messageshackers
Jump to latest
#1Daniel Gustafsson
daniel@yesql.se

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

Attachments:

intarray_bench.diffapplication/octet-stream; name=intarray_bench.diffDownload+2-1
#2Andreas 'ads' Scherbaum
adsmail@wars-nicht.de
In reply to: Daniel Gustafsson (#1)
Re: Bug in intarray bench script

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas 'ads' Scherbaum (#2)
Re: Bug in intarray bench script

"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