aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist
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/spgist
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/spgist')
-rw-r--r--src/backend/access/spgist/spgutils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 76b80146ff0..72b7661971f 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -76,6 +76,7 @@ spghandler(PG_FUNCTION_ARGS)
amroutine->amvacuumcleanup = spgvacuumcleanup;
amroutine->amcanreturn = spgcanreturn;
amroutine->amcostestimate = spgcostestimate;
+ amroutine->amgettreeheight = NULL;
amroutine->amoptions = spgoptions;
amroutine->amproperty = spgproperty;
amroutine->ambuildphasename = NULL;