mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
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
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.397 2009/07/20 02:42:28 adunstan Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.398 2009/07/26 23:34:18 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2193,8 +2193,7 @@ typedef struct ExplainStmt
|
||||
{
|
||||
NodeTag type;
|
||||
Node *query; /* the query (as a raw parse tree) */
|
||||
bool verbose; /* print plan info */
|
||||
bool analyze; /* get statistics by executing plan */
|
||||
List *options; /* list of DefElem nodes */
|
||||
} ExplainStmt;
|
||||
|
||||
/* ----------------------
|
||||
|
||||
Reference in New Issue
Block a user