1 /*-------------------------------------------------------------------------
4 * Tsearch related object caches.
6 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
11 *-------------------------------------------------------------------------
17 #include "utils/guc.h"
21 * All TS*CacheEntry structs must share this common header
22 * (see InvalidateTSCacheCallBack)
24 typedef struct TSAnyCacheEntry
31 typedef struct TSParserCacheEntry
33 /* prsId is the hash lookup key and MUST BE FIRST */
34 Oid prsId
; /* OID of the parser */
44 * Pre-set-up fmgr call of most needed parser's methods
52 typedef struct TSDictionaryCacheEntry
54 /* dictId is the hash lookup key and MUST BE FIRST */
58 /* most frequent fmgr call */
62 MemoryContext dictCtx
; /* memory context to store private data */
64 } TSDictionaryCacheEntry
;
74 /* cfgId is the hash lookup key and MUST BE FIRST */
86 * GUC variable for current configuration
88 extern char *TSCurrentConfig
;
91 extern TSParserCacheEntry
*lookup_ts_parser_cache(Oid prsId
);
92 extern TSDictionaryCacheEntry
*lookup_ts_dictionary_cache(Oid dictId
);
93 extern TSConfigCacheEntry
*lookup_ts_config_cache(Oid cfgId
);
95 extern Oid
getTSCurrentConfig(bool emitError
);
96 extern const char *assignTSCurrentConfig(const char *newval
, bool doit
, GucSource source
);
98 #endif /* TS_CACHE_H */