diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-19 02:23:12 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-19 02:23:12 +0000 |
commit | b8c326779246d6554a0868270639714cc4989a0e (patch) | |
tree | 886a2bb16966a9c3ef9e29a2a8767a98f46fa0dd /src/backend/executor/nodeValuesscan.c | |
parent | f1f2b2711a4c91064a5e64def9816c11f1bd4276 (diff) | |
download | postgresql-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/executor/nodeValuesscan.c')
-rw-r--r-- | src/backend/executor/nodeValuesscan.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/executor/nodeValuesscan.c b/src/backend/executor/nodeValuesscan.c index d055b0160c5..96e4b98a4e2 100644 --- a/src/backend/executor/nodeValuesscan.c +++ b/src/backend/executor/nodeValuesscan.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeValuesscan.c,v 1.5 2007/01/05 22:19:28 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeValuesscan.c,v 1.6 2007/02/19 02:23:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -182,7 +182,6 @@ ValuesScanState * ExecInitValuesScan(ValuesScan *node, EState *estate, int eflags) { ValuesScanState *scanstate; - RangeTblEntry *rte; TupleDesc tupdesc; ListCell *vtl; int i; @@ -236,9 +235,7 @@ ExecInitValuesScan(ValuesScan *node, EState *estate, int eflags) /* * get info about values list */ - rte = rt_fetch(node->scan.scanrelid, estate->es_range_table); - Assert(rte->rtekind == RTE_VALUES); - tupdesc = ExecTypeFromExprList((List *) linitial(rte->values_lists)); + tupdesc = ExecTypeFromExprList((List *) linitial(node->values_lists)); ExecAssignScanType(&scanstate->ss, tupdesc); @@ -247,13 +244,13 @@ ExecInitValuesScan(ValuesScan *node, EState *estate, int eflags) */ scanstate->marked_idx = -1; scanstate->curr_idx = -1; - scanstate->array_len = list_length(rte->values_lists); + scanstate->array_len = list_length(node->values_lists); /* convert list of sublists into array of sublists for easy addressing */ scanstate->exprlists = (List **) palloc(scanstate->array_len * sizeof(List *)); i = 0; - foreach(vtl, rte->values_lists) + foreach(vtl, node->values_lists) { scanstate->exprlists[i++] = (List *) lfirst(vtl); } |