From bf8bbf34bf51138555dbacc7584f54fe7dcd467c Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 28 Jul 2026 18:38:27 -0700 Subject: [PATCH] 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 a4874ae..8d5aeab 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 ba622e9..8ff2cbf 100644 --- a/src/halfvec.h +++ b/src/halfvec.h @@ -5,6 +5,13 @@ #include +#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 94c3f33..e8ab355 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 dade1db..b7ea991 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 a43e70a..2029171 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))