From e08981fa6b827ca9f74a722c230981723dbbcf19 Mon Sep 17 00:00:00 2001 From: Nate Clark Date: Sat, 26 Sep 2026 09:03:05 -0500 Subject: [PATCH v1] Fix pg_trgm GiST union dropping SIGNKEY from all-true keys gtrgm_union() assigned ALLISTRUE instead of OR-ing it in, leaving a key that unionkey() reads as an empty array. See BUG #19720. --- contrib/pg_trgm/trgm_gist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c index 42d0b7a5d6..dfa2f968d7 100644 --- a/contrib/pg_trgm/trgm_gist.c +++ b/contrib/pg_trgm/trgm_gist.c @@ -576,7 +576,7 @@ gtrgm_union(PG_FUNCTION_ARGS) { if (unionkey(base, GETENTRY(entryvec, i), siglen)) { - result->flag = ALLISTRUE; + result->flag |= ALLISTRUE; SET_VARSIZE(result, CALCGTSIZE(ALLISTRUE, siglen)); break; } base-commit: 45da2c1d75663d7a692f967b77df42a84fdd6b4d -- 2.50.1 (Apple Git-155)