PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "tsearch/ts_cache.h"
#include "tsearch/ts_utils.h"
#include "utils/builtins.h"
#include "utils/jsonfuncs.h"
Go to the source code of this file.
Data Structures | |
struct | MorphOpaque |
struct | TSVectorBuildState |
Typedefs | |
typedef struct MorphOpaque | MorphOpaque |
typedef struct TSVectorBuildState | TSVectorBuildState |
typedef struct MorphOpaque MorphOpaque |
typedef struct TSVectorBuildState TSVectorBuildState |
|
static |
Definition at line 443 of file to_tsany.c.
References ParsedText::curwords, ParsedText::lenwords, palloc(), parsetext(), ParsedText::pos, and ParsedText::words.
Referenced by json_to_tsvector_worker(), and jsonb_to_tsvector_worker().
|
static |
Definition at line 57 of file to_tsany.c.
References a, b, len, res, tsCompareString(), and word().
Referenced by uniqueWORD().
Datum get_current_ts_config | ( | PG_FUNCTION_ARGS | ) |
Datum json_string_to_tsvector | ( | PG_FUNCTION_ARGS | ) |
Definition at line 393 of file to_tsany.c.
References getTSCurrentConfig(), json_to_tsvector_worker(), jtiString, PG_FREE_IF_COPY, PG_GETARG_TEXT_P, and PG_RETURN_TSVECTOR.
Datum json_string_to_tsvector_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 380 of file to_tsany.c.
References json_to_tsvector_worker(), jtiString, PG_FREE_IF_COPY, PG_GETARG_OID, PG_GETARG_TEXT_P, and PG_RETURN_TSVECTOR.
Datum json_to_tsvector | ( | PG_FUNCTION_ARGS | ) |
Definition at line 423 of file to_tsany.c.
References getTSCurrentConfig(), json_to_tsvector_worker(), parse_jsonb_index_flags(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_GETARG_TEXT_P, and PG_RETURN_TSVECTOR.
Datum json_to_tsvector_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 407 of file to_tsany.c.
References json_to_tsvector_worker(), parse_jsonb_index_flags(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_GETARG_OID, PG_GETARG_TEXT_P, and PG_RETURN_TSVECTOR.
Definition at line 364 of file to_tsany.c.
References add_to_tsvector(), ParsedText::curwords, iterate_json_values(), make_tsvector(), and ParsedText::words.
Referenced by json_string_to_tsvector(), json_string_to_tsvector_byid(), json_to_tsvector(), and json_to_tsvector_byid().
Datum jsonb_string_to_tsvector | ( | PG_FUNCTION_ARGS | ) |
Definition at line 314 of file to_tsany.c.
References getTSCurrentConfig(), jsonb_to_tsvector_worker(), jtiString, PG_FREE_IF_COPY, PG_GETARG_JSONB_P, and PG_RETURN_TSVECTOR.
Datum jsonb_string_to_tsvector_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 301 of file to_tsany.c.
References jsonb_to_tsvector_worker(), jtiString, PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_GETARG_OID, and PG_RETURN_TSVECTOR.
Datum jsonb_to_tsvector | ( | PG_FUNCTION_ARGS | ) |
Definition at line 344 of file to_tsany.c.
References getTSCurrentConfig(), jsonb_to_tsvector_worker(), parse_jsonb_index_flags(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, and PG_RETURN_TSVECTOR.
Datum jsonb_to_tsvector_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 328 of file to_tsany.c.
References jsonb_to_tsvector_worker(), parse_jsonb_index_flags(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_GETARG_OID, and PG_RETURN_TSVECTOR.
Definition at line 285 of file to_tsany.c.
References add_to_tsvector(), ParsedText::curwords, iterate_jsonb_values(), make_tsvector(), and ParsedText::words.
Referenced by jsonb_string_to_tsvector(), jsonb_string_to_tsvector_byid(), jsonb_to_tsvector(), and jsonb_to_tsvector_byid().
TSVector make_tsvector | ( | ParsedText * | prs | ) |
Definition at line 165 of file to_tsany.c.
References ParsedWord::alen, ARRPTR, CALCDATASIZE, ParsedText::curwords, elog, ereport, errcode(), errmsg(), ERROR, WordEntry::haspos, i, j, WordEntry::len, ParsedWord::len, MAXSTRPOS, palloc0(), pfree(), WordEntry::pos, ParsedWord::pos, POSDATAPTR, SET_VARSIZE, SHORTALIGN, TSVectorData::size, str, STRPTR, uniqueWORD(), WEP_SETPOS, WEP_SETWEIGHT, ParsedWord::word, and ParsedText::words.
Referenced by json_to_tsvector_worker(), jsonb_to_tsvector_worker(), to_tsvector_byid(), and tsvector_update_trigger().
Datum phraseto_tsquery | ( | PG_FUNCTION_ARGS | ) |
Definition at line 680 of file to_tsany.c.
References DirectFunctionCall2, getTSCurrentConfig(), ObjectIdGetDatum(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, phraseto_tsquery_byid(), and PointerGetDatum().
Datum phraseto_tsquery_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 655 of file to_tsany.c.
References data, OP_PHRASE, P_TSQ_PLAIN, parse_tsquery(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_TSQUERY, PointerGetDatum(), pushval_morph(), and text_to_cstring().
Referenced by phraseto_tsquery().
Datum plainto_tsquery | ( | PG_FUNCTION_ARGS | ) |
Definition at line 642 of file to_tsany.c.
References DirectFunctionCall2, getTSCurrentConfig(), ObjectIdGetDatum(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, plainto_tsquery_byid(), and PointerGetDatum().
Referenced by ts_match_tt().
Datum plainto_tsquery_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 617 of file to_tsany.c.
References data, OP_AND, P_TSQ_PLAIN, parse_tsquery(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_POINTER, PointerGetDatum(), pushval_morph(), and text_to_cstring().
Referenced by plainto_tsquery().
|
static |
Definition at line 492 of file to_tsany.c.
References ParsedText::curwords, data, DatumGetPointer(), ParsedWord::flags, ParsedWord::len, ParsedText::lenwords, ParsedWord::nvariant, OP_AND, OP_OR, palloc(), parsetext(), pfree(), ParsedWord::pos, ParsedText::pos, pushOperator(), pushStop(), pushValue(), TSL_PREFIX, ParsedWord::word, and ParsedText::words.
Referenced by phraseto_tsquery_byid(), plainto_tsquery_byid(), to_tsquery_byid(), and websearch_to_tsquery_byid().
Datum to_tsquery | ( | PG_FUNCTION_ARGS | ) |
Definition at line 605 of file to_tsany.c.
References DirectFunctionCall2, getTSCurrentConfig(), ObjectIdGetDatum(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PointerGetDatum(), and to_tsquery_byid().
Datum to_tsquery_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 579 of file to_tsany.c.
References data, OP_PHRASE, parse_tsquery(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_TSQUERY, PointerGetDatum(), pushval_morph(), and text_to_cstring().
Referenced by to_tsquery().
Datum to_tsvector | ( | PG_FUNCTION_ARGS | ) |
Definition at line 270 of file to_tsany.c.
References DirectFunctionCall2, getTSCurrentConfig(), ObjectIdGetDatum(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PointerGetDatum(), and to_tsvector_byid().
Referenced by ts_match_tq(), and ts_match_tt().
Datum to_tsvector_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 243 of file to_tsany.c.
References ParsedText::curwords, ParsedText::lenwords, make_tsvector(), MaxAllocSize, palloc(), parsetext(), PG_FREE_IF_COPY, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_TSVECTOR, ParsedText::pos, VARDATA_ANY, VARSIZE_ANY_EXHDR, and ParsedText::words.
Referenced by to_tsvector().
|
static |
Definition at line 77 of file to_tsany.c.
References a, compareWORD(), ParsedWord::len, LIMITPOS, MAXENTRYPOS, MAXNUMPOS, palloc(), pfree(), ParsedWord::pos, qsort, repalloc(), res, and ParsedWord::word.
Referenced by make_tsvector().
Datum websearch_to_tsquery | ( | PG_FUNCTION_ARGS | ) |
Definition at line 718 of file to_tsany.c.
References DirectFunctionCall2, getTSCurrentConfig(), ObjectIdGetDatum(), PG_GETARG_TEXT_PP, PG_RETURN_DATUM, PointerGetDatum(), and websearch_to_tsquery_byid().
Datum websearch_to_tsquery_byid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 692 of file to_tsany.c.
References data, OP_PHRASE, P_TSQ_WEB, parse_tsquery(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_TSQUERY, PointerGetDatum(), pushval_morph(), and text_to_cstring().
Referenced by websearch_to_tsquery().