]> granicus.if.org Git - postgresql/commit
Fix inappropriate printing of never-measured times in EXPLAIN.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Aug 2016 16:13:04 +0000 (12:13 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Aug 2016 16:13:04 +0000 (12:13 -0400)
commit16cc6d23b8d012edb92b3b4b5fccf5200127887c
tree8994c5ba503e5c9fd85ef6dd2d0d2bac2cb7bae7
parent942ff002f9ee170d276240c71400e2772458b114
Fix inappropriate printing of never-measured times in EXPLAIN.

EXPLAIN (ANALYZE, TIMING OFF) would print an elapsed time of zero for
a trigger function, because no measurement has been taken but it printed
the field anyway.  This isn't what EXPLAIN does elsewhere, so suppress it.

In the same vein, EXPLAIN (ANALYZE, BUFFERS) with non-text output format
would print buffer I/O timing numbers even when no measurement has been
taken because track_io_timing is off.  That seems not per policy, either,
so change it.

Back-patch to 9.2 where these features were introduced.

Maksim Milyutin

Discussion: <081c0540-ecaa-bd29-3fd2-6358f3b359a9@postgrespro.ru>
src/backend/commands/explain.c