From f23d7184e9c81fc6e930d8c13afe7cb56e89e18f Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 25 Apr 2024 17:49:25 -0700 Subject: [PATCH] Moved version check to first header [skip ci] --- src/bitutils.h | 6 ++++++ src/hnsw.h | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bitutils.h b/src/bitutils.h index 0be6b71..bbebfd1 100644 --- a/src/bitutils.h +++ b/src/bitutils.h @@ -1,6 +1,12 @@ #ifndef BITUTILS_H #define BITUTILS_H +#include "postgres.h" + +#if PG_VERSION_NUM < 120000 +#error "Requires PostgreSQL 12+" +#endif + /* We use two types of dispatching: intrinsics and target_clones */ /* TODO Move to better place */ #ifndef DISABLE_DISPATCH diff --git a/src/hnsw.h b/src/hnsw.h index 7ec79ce..2f11137 100644 --- a/src/hnsw.h +++ b/src/hnsw.h @@ -12,10 +12,6 @@ #include "utils/sampling.h" #include "vector.h" -#if PG_VERSION_NUM < 120000 -#error "Requires PostgreSQL 12+" -#endif - #define HNSW_MAX_DIM 2000 #define HNSW_MAX_NNZ 1000