diff options
author | Greg Stark <stark@mit.edu> | 2013-07-29 16:38:01 +0100 |
---|---|---|
committer | Greg Stark <stark@mit.edu> | 2013-07-29 16:38:01 +0100 |
commit | c62736cc37f6812d1ebb41ea5a86ffe60564a1f0 (patch) | |
tree | 3cb1654476a7e45620d9a3320a002495d000380e /src/backend/optimizer/plan/createplan.c | |
parent | 55cbfa5366b78d93cd1ff8c4c622b552985344f6 (diff) | |
download | postgresql-c62736cc37f6812d1ebb41ea5a86ffe60564a1f0.tar.gz postgresql-c62736cc37f6812d1ebb41ea5a86ffe60564a1f0.zip |
Add SQL Standard WITH ORDINALITY support for UNNEST (and any other SRF)
Author: Andrew Gierth, David Fetter
Reviewers: Dean Rasheed, Jeevan Chalke, Stephen Frost
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 7fed5e97945..617cb19a043 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -115,8 +115,8 @@ static BitmapHeapScan *make_bitmap_heapscan(List *qptlist, static TidScan *make_tidscan(List *qptlist, List *qpqual, Index scanrelid, List *tidquals); static FunctionScan *make_functionscan(List *qptlist, List *qpqual, - Index scanrelid, Node *funcexpr, List *funccolnames, - List *funccoltypes, List *funccoltypmods, + Index scanrelid, Node *funcexpr, bool ordinality, + List *funccolnames, List *funccoltypes, List *funccoltypmods, List *funccolcollations); static ValuesScan *make_valuesscan(List *qptlist, List *qpqual, Index scanrelid, List *values_lists); @@ -1733,6 +1733,7 @@ create_functionscan_plan(PlannerInfo *root, Path *best_path, scan_plan = make_functionscan(tlist, scan_clauses, scan_relid, funcexpr, + rte->funcordinality, rte->eref->colnames, rte->funccoltypes, rte->funccoltypmods, @@ -3366,6 +3367,7 @@ make_functionscan(List *qptlist, List *qpqual, Index scanrelid, Node *funcexpr, + bool ordinality, List *funccolnames, List *funccoltypes, List *funccoltypmods, @@ -3381,6 +3383,7 @@ make_functionscan(List *qptlist, plan->righttree = NULL; node->scan.scanrelid = scanrelid; node->funcexpr = funcexpr; + node->funcordinality = ordinality; node->funccolnames = funccolnames; node->funccoltypes = funccoltypes; node->funccoltypmods = funccoltypmods; |