diff options
Diffstat (limited to 'contrib/ltree/ltree.h')
-rw-r--r-- | contrib/ltree/ltree.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h index dc68a0c212f..83fc705ef86 100644 --- a/contrib/ltree/ltree.h +++ b/contrib/ltree/ltree.h @@ -216,11 +216,13 @@ int ltree_strncasecmp(const char *a, const char *b, size_t s); /* GiST support for ltree */ -#define SIGLEN_MAX GISTMaxIndexKeySize -#define SIGLEN_DEFAULT (2 * sizeof(int32)) #define BITBYTE 8 -#define SIGLEN (sizeof(int32) * SIGLENINT) #define SIGLENBIT(siglen) ((siglen) * BITBYTE) +#define LTREE_SIGLEN_DEFAULT (2 * sizeof(int32)) +#define LTREE_SIGLEN_MAX GISTMaxIndexKeySize +#define LTREE_GET_SIGLEN() (PG_HAS_OPCLASS_OPTIONS() ? \ + ((LtreeGistOptions *) PG_GET_OPCLASS_OPTIONS())->siglen : \ + LTREE_SIGLEN_DEFAULT) typedef unsigned char *BITVECP; |