PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/jsonapi.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 442 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 58 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 392 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 379 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 422 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 406 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 363 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 313 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 300 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 343 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 327 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 284 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 166 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, generate_unaccent_rules::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 679 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 654 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 641 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 616 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 491 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 604 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 578 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 269 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 244 of file to_tsany.c.
References ParsedText::curwords, ParsedText::lenwords, make_tsvector(), 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 78 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 717 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 691 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().