|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/genam.h"#include "access/htup_details.h"#include "access/table.h"#include "access/xact.h"#include "catalog/namespace.h"#include "catalog/pg_ts_config.h"#include "catalog/pg_ts_config_map.h"#include "catalog/pg_ts_dict.h"#include "catalog/pg_ts_parser.h"#include "catalog/pg_ts_template.h"#include "commands/defrem.h"#include "miscadmin.h"#include "nodes/miscnodes.h"#include "tsearch/ts_cache.h"#include "utils/builtins.h"#include "utils/catcache.h"#include "utils/fmgroids.h"#include "utils/guc_hooks.h"#include "utils/inval.h"#include "utils/lsyscache.h"#include "utils/memutils.h"#include "utils/regproc.h"#include "utils/syscache.h"
Go to the source code of this file.
Macros | |
| #define | MAXTOKENTYPE 256 |
| #define | MAXDICTSPERTT 100 |
Functions | |
| static void | InvalidateTSCacheCallBack (Datum arg, int cacheid, uint32 hashvalue) |
| TSParserCacheEntry * | lookup_ts_parser_cache (Oid prsId) |
| TSDictionaryCacheEntry * | lookup_ts_dictionary_cache (Oid dictId) |
| static void | init_ts_config_cache (void) |
| TSConfigCacheEntry * | lookup_ts_config_cache (Oid cfgId) |
| Oid | getTSCurrentConfig (bool emitError) |
| bool | check_default_text_search_config (char **newval, void **extra, GucSource source) |
| void | assign_default_text_search_config (const char *newval, void *extra) |
| #define MAXDICTSPERTT 100 |
Definition at line 61 of file ts_cache.c.
| #define MAXTOKENTYPE 256 |
Definition at line 60 of file ts_cache.c.
Definition at line 672 of file ts_cache.c.
References InvalidOid, and TSCurrentConfigCache.
Definition at line 604 of file ts_cache.c.
References buf, elog, ereport, errcode(), errmsg(), ERROR, fb(), get_namespace_name(), get_ts_config_oid(), GETSTRUCT(), guc_free(), guc_strdup(), HeapTupleIsValid, InvalidOid, IsTransactionState(), LOG, MyDatabaseId, NameStr, newval, NIL, NOTICE, ObjectIdGetDatum(), OidIsValid, pfree(), PGC_S_TEST, quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), source, and stringToQualifiedNameList().
Definition at line 558 of file ts_cache.c.
References elog, ERROR, fb(), 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().
Definition at line 364 of file ts_cache.c.
References CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, fb(), HASH_BLOBS, hash_create(), HASH_ELEM, InvalidateTSCacheCallBack(), HASHCTL::keysize, PointerGetDatum(), and TSConfigCacheHash.
Referenced by getTSCurrentConfig(), and lookup_ts_config_cache().
Definition at line 94 of file ts_cache.c.
References arg, DatumGetPointer(), fb(), hash(), hash_seq_init(), hash_seq_search(), InvalidOid, TSAnyCacheEntry::isvalid, TSConfigCacheHash, and TSCurrentConfigCache.
Referenced by init_ts_config_cache(), lookup_ts_dictionary_cache(), and lookup_ts_parser_cache().
| TSConfigCacheEntry * lookup_ts_config_cache | ( | Oid | cfgId | ) |
Definition at line 387 of file ts_cache.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, CacheMemoryContext, TSConfigCacheEntry::cfgId, ListDictionary::dictIds, elog, ERROR, fb(), ForwardScanDirection, GETSTRUCT(), HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, i, index_close(), index_open(), init_ts_config_cache(), TSConfigCacheEntry::isvalid, lastUsedConfig, 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().
| TSDictionaryCacheEntry * lookup_ts_dictionary_cache | ( | Oid | dictId | ) |
Definition at line 208 of file ts_cache.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert, CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, DatumGetPointer(), deserialize_deflist(), TSDictionaryCacheEntry::dictCtx, TSDictionaryCacheEntry::dictData, TSDictionaryCacheEntry::dictId, elog, ERROR, fb(), fmgr_info_cxt(), GETSTRUCT(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, InvalidateTSCacheCallBack(), TSDictionaryCacheEntry::isvalid, HASHCTL::keysize, 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().
| TSParserCacheEntry * lookup_ts_parser_cache | ( | Oid | prsId | ) |
Definition at line 113 of file ts_cache.c.
References Assert, CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, elog, TSParserCacheEntry::endOid, ERROR, fb(), fmgr_info_cxt(), GETSTRUCT(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FIND, hash_search(), TSParserCacheEntry::headlineOid, HeapTupleIsValid, InvalidateTSCacheCallBack(), TSParserCacheEntry::isvalid, HASHCTL::keysize, 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().
|
static |
Definition at line 71 of file ts_cache.c.
Referenced by lookup_ts_config_cache().
|
static |
Definition at line 68 of file ts_cache.c.
Referenced by lookup_ts_dictionary_cache().
|
static |
Definition at line 65 of file ts_cache.c.
Referenced by lookup_ts_parser_cache().
Definition at line 70 of file ts_cache.c.
Referenced by getTSCurrentConfig(), init_ts_config_cache(), InvalidateTSCacheCallBack(), and lookup_ts_config_cache().
Definition at line 76 of file ts_cache.c.
Referenced by getTSCurrentConfig().
|
static |
Definition at line 78 of file ts_cache.c.
Referenced by assign_default_text_search_config(), getTSCurrentConfig(), and InvalidateTSCacheCallBack().
Definition at line 67 of file ts_cache.c.
Referenced by lookup_ts_dictionary_cache().
Definition at line 64 of file ts_cache.c.
Referenced by lookup_ts_parser_cache().