pgvector.git / summary / log / commit / refs
commit bf8bbf34bf51138555dbacc7584f54fe7dcd467c
Author: Andrew Kane <andrew@ankane.org>
Date: Wed Jul 29 01:38:27 2026 +0000
Improved includes [skip ci]
src/halfvec.c | 4 ----
src/halfvec.h | 7 +++++++
src/sparsevec.h | 3 +++
src/vector.c | 4 ----
src/vector.h | 7 +++++++
5 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/halfvec.c b/src/halfvec.c
index a4874aec..8d5aeabd 100644
--- a/src/halfvec.c
+++ b/src/halfvec.c
@@ -27,10 +27,6 @@
#include "parser/scansup.h"
#endif
-#if PG_VERSION_NUM < 190000
-#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
-#endif
-
#if PG_VERSION_NUM >= 190000
#define palloc_array_checked(type, count) ((type *) palloc_array(type, count))
#else
diff --git a/src/halfvec.h b/src/halfvec.h
index ba622e9f..8ff2cbfb 100644
--- a/src/halfvec.h
+++ b/src/halfvec.h
@@ -5,6 +5,13 @@
#include <float.h>
+#include "fmgr.h"
+#include "utils/palloc.h"
+
+#if PG_VERSION_NUM < 190000
+#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
+#endif
+
/* We use two types of dispatching: intrinsics and target_clones */
/* TODO Move to better place */
#ifndef DISABLE_DISPATCH
diff --git a/src/sparsevec.h b/src/sparsevec.h
index 94c3f33c..e8ab355c 100644
--- a/src/sparsevec.h
+++ b/src/sparsevec.h
@@ -1,6 +1,9 @@
#ifndef SPARSEVEC_H
#define SPARSEVEC_H
+#include "fmgr.h"
+#include "utils/palloc.h"
+
#if PG_VERSION_NUM < 190000
#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
#endif
diff --git a/src/vector.c b/src/vector.c
index dade1dbd..b7ea991c 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -30,10 +30,6 @@
#include "parser/scansup.h"
#endif
-#if PG_VERSION_NUM < 190000
-#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
-#endif
-
#if PG_VERSION_NUM >= 190000
#define palloc_array_checked(type, count) ((type *) palloc_array(type, count))
#else
diff --git a/src/vector.h b/src/vector.h
index a43e70a3..20291715 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -1,6 +1,13 @@
#ifndef VECTOR_H
#define VECTOR_H
+#include "fmgr.h"
+#include "utils/palloc.h"
+
+#if PG_VERSION_NUM < 190000
+#include "storage/shmem.h" /* for add_size()/mul_size() in some versions */
+#endif
+
#define VECTOR_MAX_DIM 16000
#define VECTOR_SIZE(_dim) add_size(offsetof(Vector, x), mul_size(sizeof(float), _dim))
[parent: d6310643941f]