From 3ebb9a506efe8fcd643151bf77bfb2229b5ca239 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 22 Oct 2025 11:56:05 -0700 Subject: [PATCH] Added varatt headers for Postgres 16+ --- src/hnswbuild.c | 4 ++++ src/hnswinsert.c | 4 ++++ src/hnswutils.c | 4 ++++ src/hnswvacuum.c | 4 ++++ src/ivfbuild.c | 4 ++++ src/ivfflat.h | 4 ++++ src/ivfkmeans.c | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/src/hnswbuild.c b/src/hnswbuild.c index 08d8d56..03f0ef4 100644 --- a/src/hnswbuild.c +++ b/src/hnswbuild.c @@ -54,6 +54,10 @@ #include "utils/datum.h" #include "utils/memutils.h" +#if PG_VERSION_NUM >= 160000 +#include "varatt.h" +#endif + #if PG_VERSION_NUM >= 140000 #include "utils/backend_progress.h" #else diff --git a/src/hnswinsert.c b/src/hnswinsert.c index 8adfaff..a4d2885 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -9,6 +9,10 @@ #include "utils/datum.h" #include "utils/memutils.h" +#if PG_VERSION_NUM >= 160000 +#include "varatt.h" +#endif + /* * Get the insert page */ diff --git a/src/hnswutils.c b/src/hnswutils.c index c52d2c7..8e2a42c 100644 --- a/src/hnswutils.c +++ b/src/hnswutils.c @@ -15,6 +15,10 @@ #include "utils/memdebug.h" #include "utils/rel.h" +#if PG_VERSION_NUM >= 160000 +#include "varatt.h" +#endif + #if PG_VERSION_NUM < 170000 static inline uint64 murmurhash64(uint64 data) diff --git a/src/hnswvacuum.c b/src/hnswvacuum.c index 2f7b2f3..3a8ee26 100644 --- a/src/hnswvacuum.c +++ b/src/hnswvacuum.c @@ -9,6 +9,10 @@ #include "storage/lmgr.h" #include "utils/memutils.h" +#if PG_VERSION_NUM >= 160000 +#include "varatt.h" +#endif + #if PG_VERSION_NUM >= 180000 #define vacuum_delay_point() vacuum_delay_point(false) #endif diff --git a/src/ivfbuild.c b/src/ivfbuild.c index 80433d8..7166b7d 100644 --- a/src/ivfbuild.c +++ b/src/ivfbuild.c @@ -20,6 +20,10 @@ #include "utils/memutils.h" #include "vector.h" +#if PG_VERSION_NUM >= 160000 +#include "varatt.h" +#endif + #if PG_VERSION_NUM >= 140000 #include "utils/backend_progress.h" #else diff --git a/src/ivfflat.h b/src/ivfflat.h index 76608f3..c4e64e1 100644 --- a/src/ivfflat.h +++ b/src/ivfflat.h @@ -13,6 +13,10 @@ #include "utils/tuplesort.h" #include "vector.h" +#if PG_VERSION_NUM >= 160000 +#include "varatt.h" +#endif + #if PG_VERSION_NUM >= 150000 #include "common/pg_prng.h" #endif diff --git a/src/ivfkmeans.c b/src/ivfkmeans.c index 4b6d14f..9c79e64 100644 --- a/src/ivfkmeans.c +++ b/src/ivfkmeans.c @@ -13,6 +13,10 @@ #include "utils/memutils.h" #include "vector.h" +#if PG_VERSION_NUM >= 160000 +#include "varatt.h" +#endif + /* * Initialize with kmeans++ *