PostgreSQL Source Code git master
Data Structures | Typedefs | Functions | Variables
ts_cache.h File Reference
#include "fmgr.h"
Include dependency graph for ts_cache.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct   TSAnyCacheEntry
 
struct   TSParserCacheEntry
 
 
struct   ListDictionary
 
struct   TSConfigCacheEntry
 

Typedefs

typedef struct TSAnyCacheEntry  TSAnyCacheEntry
 
 
 

Functions

 
 
 
Oid  getTSCurrentConfig (bool emitError)
 

Variables

 

Typedef Documentation

TSAnyCacheEntry

TSDictionaryCacheEntry

TSParserCacheEntry

Function Documentation

getTSCurrentConfig()

Oid getTSCurrentConfig ( bool  emitError )

Definition at line 558 of file ts_cache.c.

559{
560 List *namelist;
561
562 /* if we have a cached value, return it */
565
566 /* fail if GUC hasn't been set up yet */
567 if (TSCurrentConfig == NULL || *TSCurrentConfig == '0円')
568 {
569 if (emitError)
570 elog(ERROR, "text search configuration isn't set");
571 else
572 return InvalidOid;
573 }
574
575 if (TSConfigCacheHash == NULL)
576 {
577 /* First time through: initialize the tsconfig inval callback */
579 }
580
581 /* Look up the config */
582 if (emitError)
583 {
585 TSCurrentConfigCache = get_ts_config_oid(namelist, false);
586 }
587 else
588 {
589 ErrorSaveContext escontext = {T_ErrorSaveContext};
590
592 (Node *) &escontext);
593 if (namelist != NIL)
594 TSCurrentConfigCache = get_ts_config_oid(namelist, true);
595 else
596 TSCurrentConfigCache = InvalidOid; /* bad name list syntax */
597 }
598
600}
#define OidIsValid(objectId)
Definition: c.h:774
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:226
Oid get_ts_config_oid(List *names, bool missing_ok)
Definition: namespace.c:3222
#define NIL
Definition: pg_list.h:68
#define InvalidOid
Definition: postgres_ext.h:37
List * stringToQualifiedNameList(const char *string, Node *escontext)
Definition: regproc.c:1922
Definition: pg_list.h:54
Definition: nodes.h:135
static void init_ts_config_cache(void)
Definition: ts_cache.c:364
static HTAB * TSConfigCacheHash
Definition: ts_cache.c:70
char * TSCurrentConfig
Definition: ts_cache.c:76
static Oid TSCurrentConfigCache
Definition: ts_cache.c:78

References elog, ERROR, get_ts_config_oid(), init_ts_config_cache(), InvalidOid, NIL, OidIsValid, stringToQualifiedNameList(), TSConfigCacheHash, TSCurrentConfig, and TSCurrentConfigCache.

Referenced by get_current_ts_config(), json_string_to_tsvector(), json_to_tsvector(), jsonb_string_to_tsvector(), jsonb_to_tsvector(), phraseto_tsquery(), plainto_tsquery(), to_tsquery(), to_tsvector(), ts_headline(), ts_headline_json(), ts_headline_json_opt(), ts_headline_jsonb(), ts_headline_jsonb_opt(), ts_headline_opt(), and websearch_to_tsquery().

lookup_ts_config_cache()

TSConfigCacheEntry * lookup_ts_config_cache ( Oid  cfgId )

Definition at line 387 of file ts_cache.c.

388{
389 TSConfigCacheEntry *entry;
390
391 if (TSConfigCacheHash == NULL)
392 {
393 /* First time through: initialize the hash table */
395 }
396
397 /* Check single-entry cache */
398 if (lastUsedConfig && lastUsedConfig->cfgId == cfgId &&
400 return lastUsedConfig;
401
402 /* Try to look up an existing entry */
404 &cfgId,
405 HASH_FIND, NULL);
406 if (entry == NULL || !entry->isvalid)
407 {
408 /*
409 * If we didn't find one, we want to make one. But first look up the
410 * object to be sure the OID is real.
411 */
412 HeapTuple tp;
414 Relation maprel;
415 Relation mapidx;
416 ScanKeyData mapskey;
417 SysScanDesc mapscan;
418 HeapTuple maptup;
419 ListDictionary maplists[MAXTOKENTYPE + 1];
420 Oid mapdicts[MAXDICTSPERTT];
421 int maxtokentype;
422 int ndicts;
423 int i;
424
425 tp = SearchSysCache1(TSCONFIGOID, ObjectIdGetDatum(cfgId));
426 if (!HeapTupleIsValid(tp))
427 elog(ERROR, "cache lookup failed for text search configuration %u",
428 cfgId);
429 cfg = (Form_pg_ts_config) GETSTRUCT(tp);
430
431 /*
432 * Sanity checks
433 */
434 if (!OidIsValid(cfg->cfgparser))
435 elog(ERROR, "text search configuration %u has no parser", cfgId);
436
437 if (entry == NULL)
438 {
439 bool found;
440
441 /* Now make the cache entry */
442 entry = (TSConfigCacheEntry *)
444 &cfgId,
445 HASH_ENTER, &found);
446 Assert(!found); /* it wasn't there a moment ago */
447 }
448 else
449 {
450 /* Cleanup old contents */
451 if (entry->map)
452 {
453 for (i = 0; i < entry->lenmap; i++)
454 if (entry->map[i].dictIds)
455 pfree(entry->map[i].dictIds);
456 pfree(entry->map);
457 }
458 }
459
460 MemSet(entry, 0, sizeof(TSConfigCacheEntry));
461 entry->cfgId = cfgId;
462 entry->prsId = cfg->cfgparser;
463
464 ReleaseSysCache(tp);
465
466 /*
467 * Scan pg_ts_config_map to gather dictionary list for each token type
468 *
469 * Because the index is on (mapcfg, maptokentype, mapseqno), we will
470 * see the entries in maptokentype order, and in mapseqno order for
471 * each token type, even though we didn't explicitly ask for that.
472 */
473 MemSet(maplists, 0, sizeof(maplists));
474 maxtokentype = 0;
475 ndicts = 0;
476
477 ScanKeyInit(&mapskey,
478 Anum_pg_ts_config_map_mapcfg,
479 BTEqualStrategyNumber, F_OIDEQ,
480 ObjectIdGetDatum(cfgId));
481
482 maprel = table_open(TSConfigMapRelationId, AccessShareLock);
483 mapidx = index_open(TSConfigMapIndexId, AccessShareLock);
484 mapscan = systable_beginscan_ordered(maprel, mapidx,
485 NULL, 1, &mapskey);
486
487 while ((maptup = systable_getnext_ordered(mapscan, ForwardScanDirection)) != NULL)
488 {
490 int toktype = cfgmap->maptokentype;
491
492 if (toktype <= 0 || toktype > MAXTOKENTYPE)
493 elog(ERROR, "maptokentype value %d is out of range", toktype);
494 if (toktype < maxtokentype)
495 elog(ERROR, "maptokentype entries are out of order");
496 if (toktype > maxtokentype)
497 {
498 /* starting a new token type, but first save the prior data */
499 if (ndicts > 0)
500 {
501 maplists[maxtokentype].len = ndicts;
502 maplists[maxtokentype].dictIds = (Oid *)
504 sizeof(Oid) * ndicts);
505 memcpy(maplists[maxtokentype].dictIds, mapdicts,
506 sizeof(Oid) * ndicts);
507 }
508 maxtokentype = toktype;
509 mapdicts[0] = cfgmap->mapdict;
510 ndicts = 1;
511 }
512 else
513 {
514 /* continuing data for current token type */
515 if (ndicts >= MAXDICTSPERTT)
516 elog(ERROR, "too many pg_ts_config_map entries for one token type");
517 mapdicts[ndicts++] = cfgmap->mapdict;
518 }
519 }
520
524
525 if (ndicts > 0)
526 {
527 /* save the last token type's dictionaries */
528 maplists[maxtokentype].len = ndicts;
529 maplists[maxtokentype].dictIds = (Oid *)
531 sizeof(Oid) * ndicts);
532 memcpy(maplists[maxtokentype].dictIds, mapdicts,
533 sizeof(Oid) * ndicts);
534 /* and save the overall map */
535 entry->lenmap = maxtokentype + 1;
536 entry->map = (ListDictionary *)
538 sizeof(ListDictionary) * entry->lenmap);
539 memcpy(entry->map, maplists,
540 sizeof(ListDictionary) * entry->lenmap);
541 }
542
543 entry->isvalid = true;
544 }
545
546 lastUsedConfig = entry;
547
548 return entry;
549}
#define MemSet(start, val, len)
Definition: c.h:1019
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
Definition: dynahash.c:952
SysScanDesc systable_beginscan_ordered(Relation heapRelation, Relation indexRelation, Snapshot snapshot, int nkeys, ScanKey key)
Definition: genam.c:650
void systable_endscan_ordered(SysScanDesc sysscan)
Definition: genam.c:757
HeapTuple systable_getnext_ordered(SysScanDesc sysscan, ScanDirection direction)
Definition: genam.c:732
Assert(PointerIsAligned(start, uint64))
@ HASH_FIND
Definition: hsearch.h:113
@ HASH_ENTER
Definition: hsearch.h:114
#define HeapTupleIsValid(tuple)
Definition: htup.h:78
static void * GETSTRUCT(const HeapTupleData *tuple)
Definition: htup_details.h:728
void index_close(Relation relation, LOCKMODE lockmode)
Definition: indexam.c:177
Relation index_open(Oid relationId, LOCKMODE lockmode)
Definition: indexam.c:133
i
int i
Definition: isn.c:77
#define AccessShareLock
Definition: lockdefs.h:36
void * MemoryContextAlloc(MemoryContext context, Size size)
Definition: mcxt.c:1229
void pfree(void *pointer)
Definition: mcxt.c:1594
MemoryContext CacheMemoryContext
Definition: mcxt.c:169
FormData_pg_ts_config * Form_pg_ts_config
Definition: pg_ts_config.h:48
FormData_pg_ts_config_map * Form_pg_ts_config_map
static Datum ObjectIdGetDatum(Oid X)
Definition: postgres.h:262
unsigned int Oid
Definition: postgres_ext.h:32
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
Definition: scankey.c:76
@ ForwardScanDirection
Definition: sdir.h:28
#define BTEqualStrategyNumber
Definition: stratnum.h:31
Oid * dictIds
Definition: ts_cache.h:68
Definition: rel.h:56
Definition: skey.h:65
ListDictionary * map
Definition: ts_cache.h:80
void ReleaseSysCache(HeapTuple tuple)
Definition: syscache.c:264
HeapTuple SearchSysCache1(int cacheId, Datum key1)
Definition: syscache.c:220
void table_close(Relation relation, LOCKMODE lockmode)
Definition: table.c:126
Relation table_open(Oid relationId, LOCKMODE lockmode)
Definition: table.c:40
#define MAXTOKENTYPE
Definition: ts_cache.c:60
#define MAXDICTSPERTT
Definition: ts_cache.c:61
static TSConfigCacheEntry * lastUsedConfig
Definition: ts_cache.c:71

References AccessShareLock, Assert(), BTEqualStrategyNumber, CacheMemoryContext, TSConfigCacheEntry::cfgId, ListDictionary::dictIds, elog, ERROR, ForwardScanDirection, GETSTRUCT(), HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, i, index_close(), index_open(), init_ts_config_cache(), TSConfigCacheEntry::isvalid, lastUsedConfig, ListDictionary::len, TSConfigCacheEntry::lenmap, TSConfigCacheEntry::map, MAXDICTSPERTT, MAXTOKENTYPE, MemoryContextAlloc(), MemSet, ObjectIdGetDatum(), OidIsValid, pfree(), TSConfigCacheEntry::prsId, ReleaseSysCache(), ScanKeyInit(), SearchSysCache1(), systable_beginscan_ordered(), systable_endscan_ordered(), systable_getnext_ordered(), table_close(), table_open(), and TSConfigCacheHash.

Referenced by hlparsetext(), parsetext(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), and ts_headline_jsonb_byid_opt().

lookup_ts_dictionary_cache()

TSDictionaryCacheEntry * lookup_ts_dictionary_cache ( Oid  dictId )

Definition at line 208 of file ts_cache.c.

209{
211
212 if (TSDictionaryCacheHash == NULL)
213 {
214 /* First time through: initialize the hash table */
215 HASHCTL ctl;
216
217 ctl.keysize = sizeof(Oid);
218 ctl.entrysize = sizeof(TSDictionaryCacheEntry);
219 TSDictionaryCacheHash = hash_create("Tsearch dictionary cache", 8,
221 /* Flush cache on pg_ts_dict and pg_ts_template changes */
226
227 /* Also make sure CacheMemoryContext exists */
230 }
231
232 /* Check single-entry cache */
233 if (lastUsedDictionary && lastUsedDictionary->dictId == dictId &&
235 return lastUsedDictionary;
236
237 /* Try to look up an existing entry */
239 &dictId,
240 HASH_FIND, NULL);
241 if (entry == NULL || !entry->isvalid)
242 {
243 /*
244 * If we didn't find one, we want to make one. But first look up the
245 * object to be sure the OID is real.
246 */
247 HeapTuple tpdict,
248 tptmpl;
249 Form_pg_ts_dict dict;
250 Form_pg_ts_template template;
251 MemoryContext saveCtx;
252
253 tpdict = SearchSysCache1(TSDICTOID, ObjectIdGetDatum(dictId));
254 if (!HeapTupleIsValid(tpdict))
255 elog(ERROR, "cache lookup failed for text search dictionary %u",
256 dictId);
257 dict = (Form_pg_ts_dict) GETSTRUCT(tpdict);
258
259 /*
260 * Sanity checks
261 */
262 if (!OidIsValid(dict->dicttemplate))
263 elog(ERROR, "text search dictionary %u has no template", dictId);
264
265 /*
266 * Retrieve dictionary's template
267 */
268 tptmpl = SearchSysCache1(TSTEMPLATEOID,
269 ObjectIdGetDatum(dict->dicttemplate));
270 if (!HeapTupleIsValid(tptmpl))
271 elog(ERROR, "cache lookup failed for text search template %u",
272 dict->dicttemplate);
273 template = (Form_pg_ts_template) GETSTRUCT(tptmpl);
274
275 /*
276 * Sanity checks
277 */
278 if (!OidIsValid(template->tmpllexize))
279 elog(ERROR, "text search template %u has no lexize method",
280 template->tmpllexize);
281
282 if (entry == NULL)
283 {
284 bool found;
285
286 /* Now make the cache entry */
287 entry = (TSDictionaryCacheEntry *)
289 &dictId,
290 HASH_ENTER, &found);
291 Assert(!found); /* it wasn't there a moment ago */
292
293 /* Create private memory context the first time through */
295 "TS dictionary",
297 MemoryContextCopyAndSetIdentifier(saveCtx, NameStr(dict->dictname));
298 }
299 else
300 {
301 /* Clear the existing entry's private context */
302 saveCtx = entry->dictCtx;
303 /* Don't let context's ident pointer dangle while we reset it */
304 MemoryContextSetIdentifier(saveCtx, NULL);
305 MemoryContextReset(saveCtx);
306 MemoryContextCopyAndSetIdentifier(saveCtx, NameStr(dict->dictname));
307 }
308
309 MemSet(entry, 0, sizeof(TSDictionaryCacheEntry));
310 entry->dictId = dictId;
311 entry->dictCtx = saveCtx;
312
313 entry->lexizeOid = template->tmpllexize;
314
315 if (OidIsValid(template->tmplinit))
316 {
317 List *dictoptions;
318 Datum opt;
319 bool isnull;
320 MemoryContext oldcontext;
321
322 /*
323 * Init method runs in dictionary's private memory context, and we
324 * make sure the options are stored there too. This typically
325 * results in a small amount of memory leakage, but it's not worth
326 * complicating the API for tmplinit functions to avoid it.
327 */
328 oldcontext = MemoryContextSwitchTo(entry->dictCtx);
329
330 opt = SysCacheGetAttr(TSDICTOID, tpdict,
331 Anum_pg_ts_dict_dictinitoption,
332 &isnull);
333 if (isnull)
334 dictoptions = NIL;
335 else
336 dictoptions = deserialize_deflist(opt);
337
338 entry->dictData =
339 DatumGetPointer(OidFunctionCall1(template->tmplinit,
340 PointerGetDatum(dictoptions)));
341
342 MemoryContextSwitchTo(oldcontext);
343 }
344
345 ReleaseSysCache(tptmpl);
346 ReleaseSysCache(tpdict);
347
348 fmgr_info_cxt(entry->lexizeOid, &entry->lexize, entry->dictCtx);
349
350 entry->isvalid = true;
351 }
352
353 lastUsedDictionary = entry;
354
355 return entry;
356}
#define NameStr(name)
Definition: c.h:751
void CreateCacheMemoryContext(void)
Definition: catcache.c:709
HTAB * hash_create(const char *tabname, int64 nelem, const HASHCTL *info, int flags)
Definition: dynahash.c:358
void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)
Definition: fmgr.c:138
#define OidFunctionCall1(functionId, arg1)
Definition: fmgr.h:720
#define HASH_ELEM
Definition: hsearch.h:95
#define HASH_BLOBS
Definition: hsearch.h:97
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
Definition: inval.c:1812
void MemoryContextReset(MemoryContext context)
Definition: mcxt.c:400
void MemoryContextSetIdentifier(MemoryContext context, const char *id)
Definition: mcxt.c:658
#define AllocSetContextCreate
Definition: memutils.h:129
#define ALLOCSET_SMALL_SIZES
Definition: memutils.h:170
#define MemoryContextCopyAndSetIdentifier(cxt, id)
Definition: memutils.h:101
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:124
FormData_pg_ts_dict * Form_pg_ts_dict
Definition: pg_ts_dict.h:52
FormData_pg_ts_template * Form_pg_ts_template
Definition: pg_ts_template.h:46
static Datum PointerGetDatum(const void *X)
Definition: postgres.h:332
uint64_t Datum
Definition: postgres.h:70
static Pointer DatumGetPointer(Datum X)
Definition: postgres.h:322
tree ctl
Definition: radixtree.h:1838
Definition: hsearch.h:66
FmgrInfo lexize
Definition: ts_cache.h:59
MemoryContext dictCtx
Definition: ts_cache.h:61
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
Definition: syscache.c:595
static TSDictionaryCacheEntry * lastUsedDictionary
Definition: ts_cache.c:68
static void InvalidateTSCacheCallBack(Datum arg, int cacheid, uint32 hashvalue)
Definition: ts_cache.c:94
static HTAB * TSDictionaryCacheHash
Definition: ts_cache.c:67
struct TSDictionaryCacheEntry TSDictionaryCacheEntry
List * deserialize_deflist(Datum txt)
Definition: tsearchcmds.c:1621

References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert(), CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, DatumGetPointer(), deserialize_deflist(), TSDictionaryCacheEntry::dictCtx, TSDictionaryCacheEntry::dictData, TSDictionaryCacheEntry::dictId, elog, ERROR, fmgr_info_cxt(), GETSTRUCT(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, InvalidateTSCacheCallBack(), TSDictionaryCacheEntry::isvalid, lastUsedDictionary, TSDictionaryCacheEntry::lexize, TSDictionaryCacheEntry::lexizeOid, MemoryContextCopyAndSetIdentifier, MemoryContextReset(), MemoryContextSetIdentifier(), MemoryContextSwitchTo(), MemSet, NameStr, NIL, ObjectIdGetDatum(), OidFunctionCall1, OidIsValid, PointerGetDatum(), ReleaseSysCache(), SearchSysCache1(), SysCacheGetAttr(), and TSDictionaryCacheHash.

Referenced by LexizeExec(), thesaurus_init(), thesaurus_lexize(), ts_lexize(), and unaccent_dict().

lookup_ts_parser_cache()

TSParserCacheEntry * lookup_ts_parser_cache ( Oid  prsId )

Definition at line 113 of file ts_cache.c.

114{
115 TSParserCacheEntry *entry;
116
117 if (TSParserCacheHash == NULL)
118 {
119 /* First time through: initialize the hash table */
120 HASHCTL ctl;
121
122 ctl.keysize = sizeof(Oid);
123 ctl.entrysize = sizeof(TSParserCacheEntry);
124 TSParserCacheHash = hash_create("Tsearch parser cache", 4,
126 /* Flush cache on pg_ts_parser changes */
129
130 /* Also make sure CacheMemoryContext exists */
133 }
134
135 /* Check single-entry cache */
136 if (lastUsedParser && lastUsedParser->prsId == prsId &&
138 return lastUsedParser;
139
140 /* Try to look up an existing entry */
142 &prsId,
143 HASH_FIND, NULL);
144 if (entry == NULL || !entry->isvalid)
145 {
146 /*
147 * If we didn't find one, we want to make one. But first look up the
148 * object to be sure the OID is real.
149 */
150 HeapTuple tp;
152
153 tp = SearchSysCache1(TSPARSEROID, ObjectIdGetDatum(prsId));
154 if (!HeapTupleIsValid(tp))
155 elog(ERROR, "cache lookup failed for text search parser %u",
156 prsId);
157 prs = (Form_pg_ts_parser) GETSTRUCT(tp);
158
159 /*
160 * Sanity checks
161 */
162 if (!OidIsValid(prs->prsstart))
163 elog(ERROR, "text search parser %u has no prsstart method", prsId);
164 if (!OidIsValid(prs->prstoken))
165 elog(ERROR, "text search parser %u has no prstoken method", prsId);
166 if (!OidIsValid(prs->prsend))
167 elog(ERROR, "text search parser %u has no prsend method", prsId);
168
169 if (entry == NULL)
170 {
171 bool found;
172
173 /* Now make the cache entry */
174 entry = (TSParserCacheEntry *)
175 hash_search(TSParserCacheHash, &prsId, HASH_ENTER, &found);
176 Assert(!found); /* it wasn't there a moment ago */
177 }
178
179 MemSet(entry, 0, sizeof(TSParserCacheEntry));
180 entry->prsId = prsId;
181 entry->startOid = prs->prsstart;
182 entry->tokenOid = prs->prstoken;
183 entry->endOid = prs->prsend;
184 entry->headlineOid = prs->prsheadline;
185 entry->lextypeOid = prs->prslextype;
186
187 ReleaseSysCache(tp);
188
192 if (OidIsValid(entry->headlineOid))
193 fmgr_info_cxt(entry->headlineOid, &entry->prsheadline,
195
196 entry->isvalid = true;
197 }
198
199 lastUsedParser = entry;
200
201 return entry;
202}
FormData_pg_ts_parser * Form_pg_ts_parser
Definition: pg_ts_parser.h:55
FmgrInfo prstoken
Definition: ts_cache.h:46
FmgrInfo prsstart
Definition: ts_cache.h:45
FmgrInfo prsheadline
Definition: ts_cache.h:48
FmgrInfo prsend
Definition: ts_cache.h:47
static TSParserCacheEntry * lastUsedParser
Definition: ts_cache.c:65
static HTAB * TSParserCacheHash
Definition: ts_cache.c:64
struct TSParserCacheEntry TSParserCacheEntry

References Assert(), CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, elog, TSParserCacheEntry::endOid, ERROR, fmgr_info_cxt(), GETSTRUCT(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FIND, hash_search(), TSParserCacheEntry::headlineOid, HeapTupleIsValid, InvalidateTSCacheCallBack(), TSParserCacheEntry::isvalid, lastUsedParser, TSParserCacheEntry::lextypeOid, MemSet, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), TSParserCacheEntry::prsend, TSParserCacheEntry::prsheadline, TSParserCacheEntry::prsId, TSParserCacheEntry::prsstart, TSParserCacheEntry::prstoken, ReleaseSysCache(), SearchSysCache1(), TSParserCacheEntry::startOid, TSParserCacheEntry::tokenOid, and TSParserCacheHash.

Referenced by getTokenTypes(), hlparsetext(), parsetext(), prs_setup_firstcall(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), ts_headline_jsonb_byid_opt(), and tt_setup_firstcall().

Variable Documentation

TSCurrentConfig

PGDLLIMPORT char* TSCurrentConfig
extern

Definition at line 76 of file ts_cache.c.

Referenced by getTSCurrentConfig().

AltStyle によって変換されたページ (->オリジナル) /