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 525 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 218 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 164 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(), generate_unaccent_rules::type, LexemeEntry::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 350 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 341 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 290 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 493 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 502 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 445 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 511 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 417 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 426 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 369 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 435 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 359 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 244 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 266 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 108 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 127 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 79 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, 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().