aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/bloom/blutils.c4
-rw-r--r--src/backend/access/gin/ginutil.c2
-rw-r--r--src/backend/access/gist/gist.c2
-rw-r--r--src/backend/access/hash/hash.c4
-rw-r--r--src/backend/access/nbtree/nbtree.c4
-rw-r--r--src/backend/access/spgist/spgutils.c2
-rw-r--r--src/include/access/hash.h1
-rw-r--r--src/include/access/nbtree.h1
8 files changed, 11 insertions, 9 deletions
diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c
index 71a93e0cd46..05dbe876143 100644
--- a/contrib/bloom/blutils.c
+++ b/contrib/bloom/blutils.c
@@ -73,8 +73,8 @@ blhandler(PG_FUNCTION_ARGS)
{
IndexAmRoutine *amroutine = makeNode(IndexAmRoutine);
- amroutine->amstrategies = 1;
- amroutine->amsupport = 1;
+ amroutine->amstrategies = BLOOM_NSTRATEGIES;
+ amroutine->amsupport = BLOOM_NPROC;
amroutine->amcanorder = false;
amroutine->amcanorderbyop = false;
amroutine->amcanbackward = false;
diff --git a/src/backend/access/gin/ginutil.c b/src/backend/access/gin/ginutil.c
index 94502678abb..a2450f4687e 100644
--- a/src/backend/access/gin/ginutil.c
+++ b/src/backend/access/gin/ginutil.c
@@ -35,7 +35,7 @@ ginhandler(PG_FUNCTION_ARGS)
IndexAmRoutine *amroutine = makeNode(IndexAmRoutine);
amroutine->amstrategies = 0;
- amroutine->amsupport = 6;
+ amroutine->amsupport = GINNProcs;
amroutine->amcanorder = false;
amroutine->amcanorderbyop = false;
amroutine->amcanbackward = false;
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 996363c2ded..a29088728d2 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -57,7 +57,7 @@ gisthandler(PG_FUNCTION_ARGS)
IndexAmRoutine *amroutine = makeNode(IndexAmRoutine);
amroutine->amstrategies = 0;
- amroutine->amsupport = 9;
+ amroutine->amsupport = GISTNProcs;
amroutine->amcanorder = false;
amroutine->amcanorderbyop = true;
amroutine->amcanbackward = false;
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 8c89ee7108b..4fececeab8c 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -51,8 +51,8 @@ hashhandler(PG_FUNCTION_ARGS)
{
IndexAmRoutine *amroutine = makeNode(IndexAmRoutine);
- amroutine->amstrategies = 1;
- amroutine->amsupport = 1;
+ amroutine->amstrategies = HTMaxStrategyNumber;
+ amroutine->amsupport = HASHNProcs;
amroutine->amcanorder = false;
amroutine->amcanorderbyop = false;
amroutine->amcanbackward = true;
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index bf8ade375d1..013394c5b62 100644
--- a/src/backend/access/nbtree/nbtree.c
+++ b/src/backend/access/nbtree/nbtree.c
@@ -84,8 +84,8 @@ bthandler(PG_FUNCTION_ARGS)
{
IndexAmRoutine *amroutine = makeNode(IndexAmRoutine);
- amroutine->amstrategies = 5;
- amroutine->amsupport = 2;
+ amroutine->amstrategies = BTMaxStrategyNumber;
+ amroutine->amsupport = BTNProcs;
amroutine->amcanorder = true;
amroutine->amcanorderbyop = false;
amroutine->amcanbackward = true;
diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 201203f91a3..bc679bf75a0 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -36,7 +36,7 @@ spghandler(PG_FUNCTION_ARGS)
IndexAmRoutine *amroutine = makeNode(IndexAmRoutine);
amroutine->amstrategies = 0;
- amroutine->amsupport = 5;
+ amroutine->amsupport = SPGISTNProc;
amroutine->amcanorder = false;
amroutine->amcanorderbyop = false;
amroutine->amcanbackward = false;
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index 3a683904739..fa3f9b61caa 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -239,6 +239,7 @@ typedef HashMetaPageData *HashMetaPage;
* Since we only have one such proc in amproc, it's number 1.
*/
#define HASHPROC 1
+#define HASHNProcs 1
/* public routines */
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index ca5034907dd..d9569008d47 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -454,6 +454,7 @@ typedef struct xl_btree_newroot
#define BTORDER_PROC 1
#define BTSORTSUPPORT_PROC 2
+#define BTNProcs 2
/*
* We need to be able to tell the difference between read and write