From 5aeabc3648da3c178da1d1f6e086de4438218aa1 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 6 Feb 2022 15:26:18 -0800 Subject: [PATCH] Added comments on index handler [skip ci] --- src/ivfflat.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ivfflat.c b/src/ivfflat.c index bcf25c7..35c0e48 100644 --- a/src/ivfflat.c +++ b/src/ivfflat.c @@ -159,6 +159,11 @@ ivfflatvalidate(Oid opclassoid) return true; } +/* + * Define index handler + * + * See https://www.postgresql.org/docs/current/index-api.html + */ PG_FUNCTION_INFO_V1(ivfflathandler); Datum ivfflathandler(PG_FUNCTION_ARGS) @@ -193,6 +198,7 @@ ivfflathandler(PG_FUNCTION_ARGS) #endif amroutine->amkeytype = InvalidOid; + /* Interface functions */ amroutine->ambuild = ivfflatbuild; amroutine->ambuildempty = ivfflatbuildempty; amroutine->aminsert = ivfflatinsert; @@ -216,6 +222,8 @@ ivfflathandler(PG_FUNCTION_ARGS) amroutine->amendscan = ivfflatendscan; amroutine->ammarkpos = NULL; amroutine->amrestrpos = NULL; + + /* Interface functions to support parallel index scans */ #if PG_VERSION_NUM >= 100000 amroutine->amestimateparallelscan = NULL; amroutine->aminitparallelscan = NULL;