Fixed compilation with Postgres 16 - fixes #61

This commit is contained in:
Andrew Kane
2023-02-23 14:08:27 -08:00
parent bb71b22e2e
commit 0b3dc0887f
2 changed files with 5 additions and 1 deletions

View File

@@ -822,7 +822,7 @@ vector_accum(PG_FUNCTION_ARGS)
if (newarr)
{
for (int i = 0; i < dim; i++)
statedatums[i + 1] = Float8GetDatumFast(x[i]);
statedatums[i + 1] = Float8GetDatumFast((double) x[i]);
}
else
{

View File

@@ -3,6 +3,10 @@
#include "postgres.h"
#if PG_VERSION_NUM >= 160000
#include "varatt.h"
#endif
#define VECTOR_MAX_DIM 16000
#define VECTOR_SIZE(_dim) (offsetof(Vector, x) + sizeof(float)*(_dim))