PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/namespace.h"
#include "catalog/pg_type.h"
#include "commands/defrem.h"
#include "common/jsonapi.h"
#include "funcapi.h"
#include "tsearch/ts_cache.h"
#include "tsearch/ts_utils.h"
#include "utils/builtins.h"
#include "utils/jsonfuncs.h"
#include "utils/varlena.h"
Go to the source code of this file.
Data Structures | |
struct | TSTokenTypeStorage |
struct | HeadlineJsonState |
struct | LexemeEntry |
struct | PrsStorage |
Typedefs | |
typedef struct HeadlineJsonState | HeadlineJsonState |
typedef struct HeadlineJsonState HeadlineJsonState |
|
static |
Definition at line 530 of file wparser.c.
References TSConfigCacheEntry::cfgId, HeadlineParsedText::curwords, FunctionCall3, generateHeadline(), hlparsetext(), PointerGetDatum, and TSParserCacheEntry::prsheadline.
Referenced by ts_headline_json_byid_opt(), and ts_headline_jsonb_byid_opt().
|
static |
Definition at line 223 of file wparser.c.
References FuncCallContext::attinmeta, BuildTupleFromCStrings(), PrsStorage::cur, HeapTupleGetDatum, if(), PrsStorage::len, LexemeEntry::lexeme, PrsStorage::list, pfree(), sprintf, LexemeEntry::type, FuncCallContext::user_fctx, and values.
Referenced by ts_parse_byid(), and ts_parse_byname().
|
static |
Definition at line 167 of file wparser.c.
References FuncCallContext::attinmeta, CreateTemplateTupleDesc(), PrsStorage::cur, DatumGetInt32, DatumGetPointer, FunctionCall1, FunctionCall2, FunctionCall3, Int32GetDatum, PrsStorage::len, LexemeEntry::lexeme, PrsStorage::list, lookup_ts_parser_cache(), MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, palloc(), PointerGetDatum, TSParserCacheEntry::prsend, TSParserCacheEntry::prsstart, TSParserCacheEntry::prstoken, repalloc(), TupleDescGetAttInMetadata(), TupleDescInitEntry(), generate_unaccent_rules::type, LexemeEntry::type, FuncCallContext::user_fctx, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by ts_parse_byid(), and ts_parse_byname().
Datum ts_headline | ( | PG_FUNCTION_ARGS | ) |
Definition at line 355 of file wparser.c.
References DirectFunctionCall3, getTSCurrentConfig(), ObjectIdGetDatum, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_byid_opt().
Datum ts_headline_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 346 of file wparser.c.
References DirectFunctionCall3, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_byid_opt().
Datum ts_headline_byid_opt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 295 of file wparser.c.
References TSConfigCacheEntry::cfgId, deserialize_deflist(), ereport, errcode(), errmsg(), ERROR, FunctionCall3, generateHeadline(), TSParserCacheEntry::headlineOid, hlparsetext(), HeadlineParsedText::lenwords, lookup_ts_config_cache(), lookup_ts_parser_cache(), NIL, OidIsValid, palloc(), pfree(), PG_FREE_IF_COPY, PG_GETARG_OID, PG_GETARG_POINTER, PG_GETARG_TEXT_PP, PG_GETARG_TSQUERY, PG_NARGS, PG_RETURN_POINTER, PointerGetDatum, TSParserCacheEntry::prsheadline, TSConfigCacheEntry::prsId, HeadlineParsedText::startsel, HeadlineParsedText::stopsel, VARDATA_ANY, VARSIZE_ANY_EXHDR, and HeadlineParsedText::words.
Referenced by ts_headline(), ts_headline_byid(), and ts_headline_opt().
Datum ts_headline_json | ( | PG_FUNCTION_ARGS | ) |
Definition at line 498 of file wparser.c.
References DirectFunctionCall3, getTSCurrentConfig(), ObjectIdGetDatum, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_json_byid_opt().
Datum ts_headline_json_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 507 of file wparser.c.
References DirectFunctionCall3, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_json_byid_opt().
Datum ts_headline_json_byid_opt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 450 of file wparser.c.
References generate_unaccent_rules::action, deserialize_deflist(), ereport, errcode(), errmsg(), ERROR, headline_json_value(), HeadlineParsedText::lenwords, lookup_ts_config_cache(), lookup_ts_parser_cache(), NIL, OidIsValid, palloc(), palloc0(), pfree(), PG_FREE_IF_COPY, PG_GETARG_OID, PG_GETARG_POINTER, PG_GETARG_TEXT_P, PG_GETARG_TSQUERY, PG_NARGS, PG_RETURN_TEXT_P, PointerGetDatum, HeadlineParsedText::startsel, HeadlineParsedText::stopsel, transform_json_string_values(), and HeadlineParsedText::words.
Referenced by ts_headline_json(), ts_headline_json_byid(), and ts_headline_json_opt().
Datum ts_headline_json_opt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 516 of file wparser.c.
References DirectFunctionCall4, getTSCurrentConfig(), ObjectIdGetDatum, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_json_byid_opt().
Datum ts_headline_jsonb | ( | PG_FUNCTION_ARGS | ) |
Definition at line 422 of file wparser.c.
References DirectFunctionCall3, getTSCurrentConfig(), ObjectIdGetDatum, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_jsonb_byid_opt().
Datum ts_headline_jsonb_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 431 of file wparser.c.
References DirectFunctionCall3, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_jsonb_byid_opt().
Datum ts_headline_jsonb_byid_opt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 374 of file wparser.c.
References generate_unaccent_rules::action, deserialize_deflist(), ereport, errcode(), errmsg(), ERROR, headline_json_value(), HeadlineParsedText::lenwords, lookup_ts_config_cache(), lookup_ts_parser_cache(), NIL, OidIsValid, palloc(), palloc0(), pfree(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_GETARG_OID, PG_GETARG_POINTER, PG_GETARG_TEXT_P, PG_GETARG_TSQUERY, PG_NARGS, PG_RETURN_JSONB_P, PointerGetDatum, HeadlineParsedText::startsel, HeadlineParsedText::stopsel, transform_jsonb_string_values(), and HeadlineParsedText::words.
Referenced by ts_headline_jsonb(), ts_headline_jsonb_byid(), and ts_headline_jsonb_opt().
Datum ts_headline_jsonb_opt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 440 of file wparser.c.
References DirectFunctionCall4, getTSCurrentConfig(), ObjectIdGetDatum, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_jsonb_byid_opt().
Datum ts_headline_opt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 364 of file wparser.c.
References DirectFunctionCall4, getTSCurrentConfig(), ObjectIdGetDatum, PG_GETARG_DATUM, PG_RETURN_DATUM, and ts_headline_byid_opt().
Datum ts_parse_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 249 of file wparser.c.
References PG_FREE_IF_COPY, PG_GETARG_OID, PG_GETARG_TEXT_PP, prs_process_call(), prs_setup_firstcall(), SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, and SRF_RETURN_NEXT.
Datum ts_parse_byname | ( | PG_FUNCTION_ARGS | ) |
Definition at line 271 of file wparser.c.
References get_ts_parser_oid(), PG_GETARG_TEXT_PP, prs_process_call(), prs_setup_firstcall(), SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, and textToQualifiedNameList().
Datum ts_token_type_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 111 of file wparser.c.
References PG_GETARG_OID, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, tt_process_call(), and tt_setup_firstcall().
Datum ts_token_type_byname | ( | PG_FUNCTION_ARGS | ) |
Definition at line 130 of file wparser.c.
References get_ts_parser_oid(), PG_GETARG_TEXT_PP, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, textToQualifiedNameList(), tt_process_call(), and tt_setup_firstcall().
|
static |
Definition at line 82 of file wparser.c.
References LexDescr::alias, FuncCallContext::attinmeta, BuildTupleFromCStrings(), TSTokenTypeStorage::cur, LexDescr::descr, HeapTupleGetDatum, if(), LexDescr::lexid, TSTokenTypeStorage::list, pfree(), sprintf, FuncCallContext::user_fctx, and values.
Referenced by ts_token_type_byid(), and ts_token_type_byname().
|
static |
Definition at line 49 of file wparser.c.
References FuncCallContext::attinmeta, CreateTemplateTupleDesc(), TSTokenTypeStorage::cur, DatumGetPointer, elog(), ERROR, TSParserCacheEntry::lextypeOid, TSTokenTypeStorage::list, lookup_ts_parser_cache(), MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, OidFunctionCall1, OidIsValid, palloc(), TupleDescGetAttInMetadata(), TupleDescInitEntry(), and FuncCallContext::user_fctx.
Referenced by ts_token_type_byid(), and ts_token_type_byname().