1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Add SQL Standard WITH ORDINALITY support for UNNEST (and any other SRF)

Author: Andrew Gierth, David Fetter
Reviewers: Dean Rasheed, Jeevan Chalke, Stephen Frost
This commit is contained in:
Greg Stark
2013-07-29 16:38:01 +01:00
parent 55cbfa5366
commit c62736cc37
22 changed files with 1486 additions and 323 deletions

View File

@ -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;