MCPcopy Create free account
hub / github.com/apache/cloudberry / getTSCurrentConfig

Function getTSCurrentConfig

src/backend/utils/cache/ts_cache.c:555–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553 */
554
555Oid
556getTSCurrentConfig(bool emitError)
557{
558 /* if we have a cached value, return it */
559 if (OidIsValid(TSCurrentConfigCache))
560 return TSCurrentConfigCache;
561
562 /* fail if GUC hasn't been set up yet */
563 if (TSCurrentConfig == NULL || *TSCurrentConfig == '\0')
564 {
565 if (emitError)
566 elog(ERROR, "text search configuration isn't set");
567 else
568 return InvalidOid;
569 }
570
571 if (TSConfigCacheHash == NULL)
572 {
573 /* First time through: initialize the tsconfig inval callback */
574 init_ts_config_cache();
575 }
576
577 /* Look up the config */
578 TSCurrentConfigCache =
579 get_ts_config_oid(stringToQualifiedNameList(TSCurrentConfig),
580 !emitError);
581
582 return TSCurrentConfigCache;
583}
584
585/* GUC check_hook for default_text_search_config */
586bool

Callers 15

get_current_ts_configFunction · 0.85
to_tsvectorFunction · 0.85
jsonb_string_to_tsvectorFunction · 0.85
jsonb_to_tsvectorFunction · 0.85
json_string_to_tsvectorFunction · 0.85
json_to_tsvectorFunction · 0.85
to_tsqueryFunction · 0.85
plainto_tsqueryFunction · 0.85
phraseto_tsqueryFunction · 0.85
websearch_to_tsqueryFunction · 0.85
ts_headlineFunction · 0.85
ts_headline_optFunction · 0.85

Calls 3

init_ts_config_cacheFunction · 0.85
get_ts_config_oidFunction · 0.85

Tested by

no test coverage detected