Enhance comments, and add TODO

This commit is contained in:
Julien Rouhaud 2015-03-17 00:20:39 +01:00
parent 1a57285bb1
commit 35ffeb4852
2 changed files with 23 additions and 4 deletions

19
TODO.md Normal file
View file

@ -0,0 +1,19 @@
TODO
====
Important
---------
- handle multiple columns
- handle other am other than btree
- handle tree height
Less important
--------------
- specify tablespace
- handle collation (and what 0 means for collation ?)
- handle unique index ?
- handle reverse and nulls first
- handle index on expression
- handle index on predicate

View file

@ -273,7 +273,7 @@ addHypotheticalIndex(PlannerInfo *root,
// General stuff
index->indexoid = position+1;
index->reltablespace = rel->reltablespace; // same as relation
index->reltablespace = rel->reltablespace; // same tablespace as relation
index->rel = rel;
index->ncolumns = ncolumns = entries[position].ncolumns;
@ -350,8 +350,8 @@ addHypotheticalIndex(PlannerInfo *root,
rel->indexlist = lcons(index, rel->indexlist);
}
/* This function will execute the "addHypotheticalIndexes" for every relation
* if the isExplain flag is setup.
/* This function will execute the "addHypotheticalIndex" for every hypothetical
* index found for each relation if the isExplain flag is setup.
*/
static void hypo_get_relation_info_hook(PlannerInfo *root,
Oid relationObjectId,
@ -384,7 +384,7 @@ static void hypo_get_relation_info_hook(PlannerInfo *root,
if (entries[i].relid == InvalidOid)
break;
if (entries[i].relid == relationObjectId) {
// Call the main function which will add hypothetical indexes if needed
// hypothetical index found, add it to the relation's indextlist
addHypotheticalIndex(root, relationObjectId, inhparent, rel, relation, i);
}
}