PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/namespace.h"
#include "commands/defrem.h"
#include "funcapi.h"
#include "tsearch/ts_cache.h"
#include "tsearch/ts_utils.h"
#include "utils/fmgrprotos.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 523 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 216 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 162 of file wparser.c.
References FuncCallContext::attinmeta, PrsStorage::cur, DatumGetInt32(), DatumGetPointer(), elog, ERROR, FunctionCall1, FunctionCall2, FunctionCall3, get_call_result_type(), 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(), FuncCallContext::tuple_desc, TupleDescGetAttInMetadata(), LexemeEntry::type, type, TYPEFUNC_COMPOSITE, 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 348 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 339 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 288 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 491 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 500 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 443 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 509 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 415 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 424 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 367 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 433 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 357 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 242 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 264 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 106 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 125 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 77 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 47 of file wparser.c.
References FuncCallContext::attinmeta, TSTokenTypeStorage::cur, DatumGetPointer(), elog, ERROR, get_call_result_type(), TSParserCacheEntry::lextypeOid, TSTokenTypeStorage::list, lookup_ts_parser_cache(), MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, OidFunctionCall1, OidIsValid, palloc(), FuncCallContext::tuple_desc, TupleDescGetAttInMetadata(), TYPEFUNC_COMPOSITE, and FuncCallContext::user_fctx.
Referenced by ts_token_type_byid(), and ts_token_type_byname().