aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-02-19 02:23:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-02-19 02:23:12 +0000
commitb8c326779246d6554a0868270639714cc4989a0e (patch)
tree886a2bb16966a9c3ef9e29a2a8767a98f46fa0dd /src/backend/commands/explain.c
parentf1f2b2711a4c91064a5e64def9816c11f1bd4276 (diff)
downloadpostgresql-b8c326779246d6554a0868270639714cc4989a0e.tar.gz
postgresql-b8c326779246d6554a0868270639714cc4989a0e.zip
Put function expressions and values lists into FunctionScan and ValuesScan
plan nodes, so that the executor does not need to get these items from the range table at runtime. This will avoid needing to include these fields in the compact range table I'm expecting to make the executor use.
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 9ea32d7707a..7b2c521a353 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994-5, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.154 2007/02/14 01:58:56 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.155 2007/02/19 02:23:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -640,6 +640,7 @@ explain_outNode(StringInfo str,
{
RangeTblEntry *rte = rt_fetch(((Scan *) plan)->scanrelid,
es->rtable);
+ Node *funcexpr;
char *proname;
/* Assert it's on a RangeFunction */
@@ -651,10 +652,10 @@ explain_outNode(StringInfo str,
* happen if the optimizer simplified away the function call,
* for example).
*/
- if (rte->funcexpr && IsA(rte->funcexpr, FuncExpr))
+ funcexpr = ((FunctionScan *) plan)->funcexpr;
+ if (funcexpr && IsA(funcexpr, FuncExpr))
{
- FuncExpr *funcexpr = (FuncExpr *) rte->funcexpr;
- Oid funcid = funcexpr->funcid;
+ Oid funcid = ((FuncExpr *) funcexpr)->funcid;
/* We only show the func name, not schema name */
proname = get_func_name(funcid);