21 #include "utils/fmgrprotos.h"
56 elog(
ERROR,
"method lextype isn't defined for text search parser %u",
69 elog(
ERROR,
"return type must be a row type");
209 elog(
ERROR,
"return type must be a row type");
305 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
306 errmsg(
"text search parser does not support headline creation")));
385 state->query = query;
393 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
394 errmsg(
"text search parser does not support headline creation")));
405 if (
state->transformed)
462 state->query = query;
470 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
471 errmsg(
"text search parser does not support headline creation")));
481 if (
state->transformed)
540 state->transformed =
true;
static Datum values[MAXATTR]
#define OidIsValid(objectId)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values)
AttInMetadata * TupleDescGetAttInMetadata(TupleDesc tupdesc)
#define OidFunctionCall1(functionId, arg1)
#define PG_FREE_IF_COPY(ptr, n)
#define PG_GETARG_TEXT_PP(n)
#define DirectFunctionCall4(func, arg1, arg2, arg3, arg4)
#define PG_GETARG_POINTER(n)
#define PG_GETARG_DATUM(n)
#define FunctionCall1(flinfo, arg1)
#define PG_RETURN_TEXT_P(x)
#define FunctionCall2(flinfo, arg1, arg2)
#define PG_RETURN_DATUM(x)
#define DirectFunctionCall3(func, arg1, arg2, arg3)
#define PG_RETURN_POINTER(x)
#define FunctionCall3(flinfo, arg1, arg2, arg3)
#define PG_GETARG_TEXT_P(n)
TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo, Oid *resultTypeId, TupleDesc *resultTupleDesc)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
#define SRF_RETURN_DONE(_funcctx)
if(TABLE==NULL||TABLE_index==NULL)
#define PG_RETURN_JSONB_P(x)
#define PG_GETARG_JSONB_P(x)
text * transform_json_string_values(text *json, void *action_state, JsonTransformStringValuesAction transform_action)
Jsonb * transform_jsonb_string_values(Jsonb *jsonb, void *action_state, JsonTransformStringValuesAction transform_action)
text *(* JsonTransformStringValuesAction)(void *state, char *elem_value, int elem_len)
void pfree(void *pointer)
void * palloc0(Size size)
void * repalloc(void *pointer, Size size)
Oid get_ts_parser_oid(List *names, bool missing_ok)
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum Int32GetDatum(int32 X)
static int32 DatumGetInt32(Datum X)
MemoryContextSwitchTo(old_ctx)
AttInMetadata * attinmeta
MemoryContext multi_call_memory_ctx
TSParserCacheEntry * prsobj
HeadlineWordEntry * words
Oid getTSCurrentConfig(bool emitError)
TSConfigCacheEntry * lookup_ts_config_cache(Oid cfgId)
TSParserCacheEntry * lookup_ts_parser_cache(Oid prsId)
void hlparsetext(Oid cfgId, HeadlineParsedText *prs, TSQuery query, char *buf, int buflen)
text * generateHeadline(HeadlineParsedText *prs)
#define PG_GETARG_TSQUERY(n)
List * deserialize_deflist(Datum txt)
#define VARSIZE_ANY_EXHDR(PTR)
List * textToQualifiedNameList(text *textval)
static void prs_setup_firstcall(FuncCallContext *funcctx, FunctionCallInfo fcinfo, Oid prsid, text *txt)
Datum ts_headline_opt(PG_FUNCTION_ARGS)
Datum ts_parse_byname(PG_FUNCTION_ARGS)
Datum ts_token_type_byid(PG_FUNCTION_ARGS)
Datum ts_headline(PG_FUNCTION_ARGS)
Datum ts_headline_byid_opt(PG_FUNCTION_ARGS)
static Datum prs_process_call(FuncCallContext *funcctx)
Datum ts_headline_json_byid_opt(PG_FUNCTION_ARGS)
Datum ts_headline_jsonb_byid_opt(PG_FUNCTION_ARGS)
Datum ts_parse_byid(PG_FUNCTION_ARGS)
Datum ts_headline_byid(PG_FUNCTION_ARGS)
struct HeadlineJsonState HeadlineJsonState
Datum ts_headline_jsonb_byid(PG_FUNCTION_ARGS)
static void tt_setup_firstcall(FuncCallContext *funcctx, FunctionCallInfo fcinfo, Oid prsid)
Datum ts_token_type_byname(PG_FUNCTION_ARGS)
Datum ts_headline_json_opt(PG_FUNCTION_ARGS)
Datum ts_headline_jsonb(PG_FUNCTION_ARGS)
Datum ts_headline_jsonb_opt(PG_FUNCTION_ARGS)
Datum ts_headline_json(PG_FUNCTION_ARGS)
static text * headline_json_value(void *_state, char *elem_value, int elem_len)
static Datum tt_process_call(FuncCallContext *funcctx)
Datum ts_headline_json_byid(PG_FUNCTION_ARGS)