diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..a1cb271 --- /dev/null +++ b/TODO.md @@ -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 diff --git a/pg_hypo.c b/pg_hypo.c index 593b55d..1a86d94 100644 --- a/pg_hypo.c +++ b/pg_hypo.c @@ -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); } }