From e6c9a5a9bcc9774e6a29cf9cea489b42f492e019 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 30 Aug 2016 12:00:00 -0400 Subject: [PATCH] Fix mixup of bool and ternary value Not currently a problem, but could be with stricter bool behavior under stdbool or C++. Reviewed-by: Andres Freund --- src/backend/access/gin/ginscan.c | 2 +- src/include/access/gin_private.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/access/gin/ginscan.c b/src/backend/access/gin/ginscan.c index c3ce0479c5..c83375d6b4 100644 --- a/src/backend/access/gin/ginscan.c +++ b/src/backend/access/gin/ginscan.c @@ -147,7 +147,7 @@ ginFillScanKey(GinScanOpaque so, OffsetNumber attnum, key->nuserentries = nUserQueryValues; key->scanEntry = (GinScanEntry *) palloc(sizeof(GinScanEntry) * nQueryValues); - key->entryRes = (bool *) palloc0(sizeof(bool) * nQueryValues); + key->entryRes = (GinTernaryValue *) palloc0(sizeof(GinTernaryValue) * nQueryValues); key->query = query; key->queryValues = queryValues; diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index f2e9c4ddec..986fe6e041 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -281,7 +281,7 @@ typedef struct GinScanKeyData int nadditional; /* array of check flags, reported to consistentFn */ - bool *entryRes; + GinTernaryValue *entryRes; bool (*boolConsistentFn) (GinScanKey key); GinTernaryValue (*triConsistentFn) (GinScanKey key); FmgrInfo *consistentFmgrInfo; -- 2.40.0