diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-01 03:03:05 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-01 03:03:05 +0000 |
commit | 80c6847cc59cb5deecb014fa6ecfd2d2dd7c45ed (patch) | |
tree | b123ed15b33425ca0ec89aefdcff050bdd471790 /src/backend/optimizer/plan/createplan.c | |
parent | 6c33054a0c4a05a185821fba1b82d3eda195b769 (diff) | |
download | postgresql-80c6847cc59cb5deecb014fa6ecfd2d2dd7c45ed.tar.gz postgresql-80c6847cc59cb5deecb014fa6ecfd2d2dd7c45ed.zip |
Desultory de-FastList-ification. RelOptInfo.reltargetlist is back to
being a plain List.
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 719ca63321a..357144f6c40 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.171 2004/05/30 23:40:28 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.172 2004/06/01 03:02:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -261,20 +261,19 @@ create_scan_plan(Query *root, Path *best_path) static List * build_relation_tlist(RelOptInfo *rel) { - FastList tlist; + List *tlist = NIL; int resdomno = 1; ListCell *v; - FastListInit(&tlist); - foreach(v, FastListValue(&rel->reltargetlist)) + foreach(v, rel->reltargetlist) { /* Do we really need to copy here? Not sure */ Var *var = (Var *) copyObject(lfirst(v)); - FastAppend(&tlist, create_tl_element(var, resdomno)); + tlist = lappend(tlist, create_tl_element(var, resdomno)); resdomno++; } - return FastListValue(&tlist); + return tlist; } /* @@ -701,7 +700,7 @@ create_indexscan_plan(Query *root, List *indxstrategy; List *indxsubtype; List *indxlossy; - FastList indexids; + List *indexids; ListCell *l; IndexScan *scan_plan; @@ -737,12 +736,12 @@ create_indexscan_plan(Query *root, scan_clauses = order_qual_clauses(root, scan_clauses); /* Build list of index OIDs */ - FastListInit(&indexids); + indexids = NIL; foreach(l, best_path->indexinfo) { IndexOptInfo *index = (IndexOptInfo *) lfirst(l); - FastAppendo(&indexids, index->indexoid); + indexids = lappend_oid(indexids, index->indexoid); } /* @@ -801,7 +800,7 @@ create_indexscan_plan(Query *root, scan_plan = make_indexscan(tlist, qpqual, baserelid, - FastListValue(&indexids), + indexids, fixed_indxquals, stripped_indxquals, indxstrategy, @@ -1427,28 +1426,27 @@ get_switched_clauses(List *clauses, Relids outerrelids) static List * order_qual_clauses(Query *root, List *clauses) { - FastList nosubplans; - FastList withsubplans; + List *nosubplans; + List *withsubplans; ListCell *l; /* No need to work hard if the query is subselect-free */ if (!root->hasSubLinks) return clauses; - FastListInit(&nosubplans); - FastListInit(&withsubplans); + nosubplans = NIL; + withsubplans = NIL; foreach(l, clauses) { Node *clause = (Node *) lfirst(l); if (contain_subplans(clause)) - FastAppend(&withsubplans, clause); + withsubplans = lappend(withsubplans, clause); else - FastAppend(&nosubplans, clause); + nosubplans = lappend(nosubplans, clause); } - FastConcFast(&nosubplans, &withsubplans); - return FastListValue(&nosubplans); + return list_concat(nosubplans, withsubplans); } /* |