1 /*-------------------------------------------------------------------------
4 * Tsearch related object caches.
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/tsearch/ts_cache.h
11 *-------------------------------------------------------------------------
20 * All TS*CacheEntry structs must share this common header
21 * (see InvalidateTSCacheCallBack)
23 typedef struct TSAnyCacheEntry
30 typedef struct TSParserCacheEntry
32 /* prsId is the hash lookup key and MUST BE FIRST */
33 Oid prsId
; /* OID of the parser */
43 * Pre-set-up fmgr call of most needed parser's methods
51 typedef struct TSDictionaryCacheEntry
53 /* dictId is the hash lookup key and MUST BE FIRST */
57 /* most frequent fmgr call */
61 MemoryContext dictCtx
; /* memory context to store private data */
63 } TSDictionaryCacheEntry
;
73 /* cfgId is the hash lookup key and MUST BE FIRST */
85 * GUC variable for current configuration
87 extern PGDLLIMPORT
char *TSCurrentConfig
;
90 extern TSParserCacheEntry
*lookup_ts_parser_cache(Oid prsId
);
91 extern TSDictionaryCacheEntry
*lookup_ts_dictionary_cache(Oid dictId
);
92 extern TSConfigCacheEntry
*lookup_ts_config_cache(Oid cfgId
);
94 extern Oid
getTSCurrentConfig(bool emitError
);
96 #endif /* TS_CACHE_H */