diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-13 20:57:19 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-13 20:57:19 +0000 |
commit | 1cc29fe7c60ba643c114979dbe588d3a38005449 (patch) | |
tree | 432913ae6834cea94e9dced0dfdfab2329b0a090 /src/include/utils/builtins.h | |
parent | 4504a1bc017ff006c129dfce3e691f0d9b29a0c3 (diff) | |
download | postgresql-1cc29fe7c60ba643c114979dbe588d3a38005449.tar.gz postgresql-1cc29fe7c60ba643c114979dbe588d3a38005449.zip |
Teach EXPLAIN to print PARAM_EXEC Params as the referenced expressions,
rather than just $N. This brings the display of nestloop-inner-indexscan
plans back to where it's been, and incidentally improves the display of
SubPlan parameters as well. In passing, simplify the EXPLAIN code by
having it deal primarily in the PlanState tree rather than separately
searching Plan and PlanState trees. This is noticeably cleaner for
subplans, and about a wash elsewhere.
One small difference from previous behavior is that EXPLAIN will no longer
qualify local variable references in inner-indexscan plan nodes, since it
no longer sees such nodes as possibly referencing multiple tables. Vars
referenced through PARAM_EXEC Params are still forcibly qualified, though,
so I don't think the display is any more confusing than before. Adjust a
couple of examples in the documentation to match this behavior.
Diffstat (limited to 'src/include/utils/builtins.h')
-rw-r--r-- | src/include/utils/builtins.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index a95c608f040..9f0586855c7 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.350 2010/07/06 19:19:00 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.351 2010/07/13 20:57:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -609,8 +609,8 @@ extern Datum pg_get_function_result(PG_FUNCTION_ARGS); extern char *deparse_expression(Node *expr, List *dpcontext, bool forceprefix, bool showimplicit); extern List *deparse_context_for(const char *aliasname, Oid relid); -extern List *deparse_context_for_plan(Node *plan, Node *outer_plan, - List *rtable, List *subplans); +extern List *deparse_context_for_planstate(Node *planstate, List *ancestors, + List *rtable); extern const char *quote_identifier(const char *ident); extern char *quote_qualified_identifier(const char *qualifier, const char *ident); |