diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/amapi.h | 8 | ||||
-rw-r--r-- | src/include/access/nbtree.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/include/access/amapi.h b/src/include/access/amapi.h index f25c9d58a7d..c51de742ea0 100644 --- a/src/include/access/amapi.h +++ b/src/include/access/amapi.h @@ -140,6 +140,13 @@ typedef void (*amcostestimate_function) (struct PlannerInfo *root, double *indexCorrelation, double *indexPages); +/* estimate height of a tree-structured index + * + * XXX This just computes a value that is later used by amcostestimate. This + * API could be expanded to support passing more values if the need arises. + */ +typedef int (*amgettreeheight_function) (Relation rel); + /* parse index reloptions */ typedef bytea *(*amoptions_function) (Datum reloptions, bool validate); @@ -272,6 +279,7 @@ typedef struct IndexAmRoutine amvacuumcleanup_function amvacuumcleanup; amcanreturn_function amcanreturn; /* can be NULL */ amcostestimate_function amcostestimate; + amgettreeheight_function amgettreeheight; /* can be NULL */ amoptions_function amoptions; amproperty_function amproperty; /* can be NULL */ ambuildphasename_function ambuildphasename; /* can be NULL */ diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 9af9b3ecdcc..d64300fb973 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -1186,6 +1186,7 @@ extern IndexBulkDeleteResult *btbulkdelete(IndexVacuumInfo *info, extern IndexBulkDeleteResult *btvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats); extern bool btcanreturn(Relation index, int attno); +extern int btgettreeheight(Relation rel); /* * prototypes for internal functions in nbtree.c |