]> granicus.if.org Git - postgresql/commit
Extend EXPLAIN to allow generic options to be specified.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 26 Jul 2009 23:34:18 +0000 (23:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 26 Jul 2009 23:34:18 +0000 (23:34 +0000)
commitd4382c4ae7ea1e272f4fee388aac8ff99421471a
treea6fdb904bcdb849f15f68c9ad5541186d0b4216e
parenta07e5acebbc0647c82c8577f17f912561e69aff4
Extend EXPLAIN to allow generic options to be specified.

The original syntax made it difficult to add options without making them
into reserved words.  This change parenthesizes the options to avoid that
problem, and makes provision for an explicit (and perhaps non-Boolean)
value for each option.  The original syntax is still supported, but only
for the two original options ANALYZE and VERBOSE.

As a test case, add a COSTS option that can suppress the planner cost
estimates.  This may be useful for including EXPLAIN output in the regression
tests, which are otherwise unable to cope with cross-platform variations in
cost estimates.

Robert Haas
12 files changed:
contrib/auto_explain/auto_explain.c
doc/src/sgml/ref/explain.sgml
src/backend/commands/define.c
src/backend/commands/explain.c
src/backend/commands/prepare.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/tcop/utility.c
src/include/commands/explain.h
src/include/commands/prepare.h
src/include/nodes/parsenodes.h