0001-Hack-to-make-unaccent-poke-syscache.patch
application/octet-stream
Filename: 0001-Hack-to-make-unaccent-poke-syscache.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0001
Subject: Hack to make unaccent poke syscache.
| File | + | − |
|---|---|---|
| contrib/unaccent/unaccent.c | 9 | 0 |
From deebf3f3ca297b0ed75d4522b104a2705357d92c Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@enterprisedb.com>
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