pgvector.git / summary / log / commit / refs
commit 32e95a8598200788bfc13fb1b9b8284b45f07eda
Author: Andrew Kane <andrew@ankane.org>
Date: Sat Apr 05 19:13:38 2025 +0000
Fixed warnings with Postgres 18 [skip ci]
src/hnsw.c | 3 +++
src/ivfflat.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/hnsw.c b/src/hnsw.c
index ec7c9885..d0d7086d 100644
--- a/src/hnsw.c
+++ b/src/hnsw.c
@@ -223,6 +223,9 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
static bytea *
hnswoptions(Datum reloptions, bool validate)
{
+#if PG_VERSION_NUM >= 180000
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
static const relopt_parse_elt tab[] = {
{"m", RELOPT_TYPE_INT, offsetof(HnswOptions, m)},
{"ef_construction", RELOPT_TYPE_INT, offsetof(HnswOptions, efConstruction)},
diff --git a/src/ivfflat.c b/src/ivfflat.c
index 736d537d..9d95f1d1 100644
--- a/src/ivfflat.c
+++ b/src/ivfflat.c
@@ -151,6 +151,9 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
static bytea *
ivfflatoptions(Datum reloptions, bool validate)
{
+#if PG_VERSION_NUM >= 180000
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
static const relopt_parse_elt tab[] = {
{"lists", RELOPT_TYPE_INT, offsetof(IvfflatOptions, lists)},
};
[parent: a03dc5b7d0aa]