pgvector.git / summary / log / commit / refs
commit f23d7184e9c81fc6e930d8c13afe7cb56e89e18f
Author: Andrew Kane <andrew@ankane.org>
Date: Fri Apr 26 00:49:25 2024 +0000
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 0be6b715..bbebfd12 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 7ec79ced..2f111373 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
[parent: cd95d6dfa49a]