From deebf3f3ca297b0ed75d4522b104a2705357d92c Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 30 Aug 2018 10:28:01 +1200 Subject: [PATCH 1/2] Hack to make unaccent poke syscache. --- contrib/unaccent/unaccent.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/unaccent/unaccent.c b/contrib/unaccent/unaccent.c index 247c202755..8e921566f3 100644 --- a/contrib/unaccent/unaccent.c +++ b/contrib/unaccent/unaccent.c @@ -21,9 +21,18 @@ #include "tsearch/ts_public.h" #include "utils/builtins.h" #include "utils/regproc.h" +#include "utils/syscache.h" PG_MODULE_MAGIC; +void _PG_init(void); + +void +_PG_init(void) +{ + SearchSysCache1(PROCOID, ObjectIdGetDatum(999999)); +} + /* * An unaccent dictionary uses a trie to find a string to replace. Each node * of the trie is an array of 256 TrieChar structs; the N-th element of the -- 2.17.0