aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-09-10 09:51:55 +0200
committerPeter Eisentraut <peter@eisentraut.org>2024-09-10 10:03:23 +0200
commit56fead44dcc70df9f9188fee08e5aefe3da43ccc (patch)
treee7b2c776e4d5f2727403d19c16066d6ffb28a741 /src/backend/access/gist/gist.c
parentf5050f795aea67dfc40bbc429c8934e9439e22e7 (diff)
downloadpostgresql-56fead44dcc70df9f9188fee08e5aefe3da43ccc.tar.gz
postgresql-56fead44dcc70df9f9188fee08e5aefe3da43ccc.zip
Add amgettreeheight index AM API routine
The only current implementation is for btree where it calls _bt_getrootheight(). Other index types can now also use this to pass information to their amcostestimate routine. Previously, btree was hardcoded and other index types could not hook into the optimizer at this point. Author: Mark Dilger <mark.dilger@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
Diffstat (limited to 'src/backend/access/gist/gist.c')
-rw-r--r--src/backend/access/gist/gist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index ed4ffa63a77..2d7a0687d4a 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -91,6 +91,7 @@ gisthandler(PG_FUNCTION_ARGS)
amroutine->amvacuumcleanup = gistvacuumcleanup;
amroutine->amcanreturn = gistcanreturn;
amroutine->amcostestimate = gistcostestimate;
+ amroutine->amgettreeheight = NULL;
amroutine->amoptions = gistoptions;
amroutine->amproperty = gistproperty;
amroutine->ambuildphasename = NULL;