PostgreSQL Source Code git master
|
#include "postgres.h"
#include <ctype.h>
#include <limits.h>
#include "access/detoast.h"
#include "access/toast_compression.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_type.h"
#include "common/hashfn.h"
#include "common/int.h"
#include "common/unicode_category.h"
#include "common/unicode_norm.h"
#include "common/unicode_version.h"
#include "funcapi.h"
#include "lib/hyperloglog.h"
#include "libpq/pqformat.h"
#include "miscadmin.h"
#include "nodes/execnodes.h"
#include "parser/scansup.h"
#include "port/pg_bswap.h"
#include "regex/regex.h"
#include "utils/builtins.h"
#include "utils/bytea.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/pg_locale.h"
#include "utils/sortsupport.h"
#include "utils/varlena.h"
#include "levenshtein.c"
Go to the source code of this file.
Data Structures | |
struct | TextPositionState |
struct | VarStringSortSupport |
struct | SplitTextOutputData |
Macros | |
#define | TEXTBUFLEN 1024 |
#define | DatumGetVarStringP(X) ((VarString *) PG_DETOAST_DATUM(X)) |
#define | DatumGetVarStringPP(X) ((VarString *) PG_DETOAST_DATUM_PACKED(X)) |
#define | VAL(CH) ((CH) - '0') |
#define | DIG(VAL) ((VAL) + '0') |
#define | CmpCall(cmpfunc) |
#define | PG_STR_GET_BYTEA(str_) DatumGetByteaPP(DirectFunctionCall1(byteain, CStringGetDatum(str_))) |
#define | TEXT_FORMAT_FLAG_MINUS 0x0001 /* is minus flag present? */ |
#define | ADVANCE_PARSE_POINTER(ptr, end_ptr) |
#define | LEVENSHTEIN_LESS_EQUAL |
Typedefs | |
typedef struct varlena | VarString |
Variables | |
int | bytea_output = BYTEA_OUTPUT_HEX |
#define ADVANCE_PARSE_POINTER | ( | ptr, | |
end_ptr | |||
) |
#define CmpCall | ( | cmpfunc | ) |
#define DatumGetVarStringP | ( | X | ) | ((VarString *) PG_DETOAST_DATUM(X)) |
#define DatumGetVarStringPP | ( | X | ) | ((VarString *) PG_DETOAST_DATUM_PACKED(X)) |
#define PG_STR_GET_BYTEA | ( | str_ | ) | DatumGetByteaPP(DirectFunctionCall1(byteain, CStringGetDatum(str_))) |
#define TEXT_FORMAT_FLAG_MINUS 0x0001 /* is minus flag present? */ |
|
static |
Definition at line 4119 of file varlena.c.
References appendBinaryStringInfo(), appendStringInfoChar(), Assert, charlen_to_bytelen(), idx(), replace_text(), str, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by replace_text_regexp().
|
static |
Definition at line 3995 of file varlena.c.
References appendBinaryStringInfo(), str, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by replace_text(), replace_text_regexp(), string_agg_transfn(), xmlcomment(), and XmlTableGetValue().
Datum array_to_text | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4779 of file varlena.c.
References array_to_text_internal(), PG_GETARG_ARRAYTYPE_P, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, and text_to_cstring().
|
static |
Definition at line 4821 of file varlena.c.
References appendStringInfo(), appendStringInfoString(), ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_NDIM, ARR_NULLBITMAP, ArrayGetNItems(), att_addlength_pointer, att_align_nominal, buf, cstring_to_text_with_len(), ArrayMetaState::element_type, fetch_att(), FunctionCallInfoBaseData::flinfo, fmgr_info_cxt(), FmgrInfo::fn_extra, FmgrInfo::fn_mcxt, get_type_io_data(), i, if(), initStringInfo(), IOFunc_output, MemoryContextAlloc(), nitems, OutputFunctionCall(), pfree(), ArrayMetaState::proc, typalign, ArrayMetaState::typalign, ArrayMetaState::typbyval, ArrayMetaState::typdelim, ArrayMetaState::typiofunc, ArrayMetaState::typioparam, ArrayMetaState::typlen, and value.
Referenced by array_to_text(), array_to_text_null(), and concat_internal().
Datum array_to_text_null | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4795 of file varlena.c.
References array_to_text_internal(), PG_ARGISNULL, PG_GETARG_ARRAYTYPE_P, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, and text_to_cstring().
|
static |
Definition at line 2030 of file varlena.c.
References bpchartruelen(), DatumGetBpCharPP, Min, pfree(), PointerGetDatum(), VARDATA_ANY, VARSIZE_ANY_EXHDR, x, and y.
Referenced by varstr_sortsupport().
Datum btnametextcmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2675 of file varlena.c.
References NameStr, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_INT32, VARDATA_ANY, VARSIZE_ANY_EXHDR, and varstr_cmp().
Referenced by namegetext(), namegttext(), nameletext(), and namelttext().
Datum bttext_pattern_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2858 of file varlena.c.
References internal_text_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, and PG_RETURN_INT32.
Datum bttext_pattern_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2874 of file varlena.c.
References MemoryContextSwitchTo(), PG_GETARG_POINTER, PG_RETURN_VOID, SortSupportData::ssup_cxt, and varstr_sortsupport().
Datum bttextcmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1814 of file varlena.c.
References PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_INT32, and text_cmp().
Referenced by gbt_textcmp().
Datum bttextnamecmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2691 of file varlena.c.
References NameStr, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_INT32, VARDATA_ANY, VARSIZE_ANY_EXHDR, and varstr_cmp().
Referenced by textgename(), textgtname(), textlename(), and textltname().
Datum bttextsortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1829 of file varlena.c.
References collid, MemoryContextSwitchTo(), PG_GETARG_POINTER, PG_RETURN_VOID, SortSupportData::ssup_collation, SortSupportData::ssup_cxt, and varstr_sortsupport().
Datum btvarstrequalimage | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2532 of file varlena.c.
References check_collation_set(), collid, locale, PG_GET_COLLATION, pg_newlocale_from_collation(), and PG_RETURN_BOOL.
|
static |
Definition at line 5397 of file varlena.c.
References elog, ERROR, FunctionCallInfoBaseData::flinfo, fmgr_info_cxt(), FmgrInfo::fn_extra, FmgrInfo::fn_mcxt, get_fn_expr_argtype(), getTypeOutputInfo(), i, MemoryContextAlloc(), OidIsValid, and PG_NARGS.
Referenced by concat_internal().
Datum bytea_bit_count | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3126 of file varlena.c.
References PG_GETARG_BYTEA_PP, pg_popcount(), PG_RETURN_INT64, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Definition at line 2928 of file varlena.c.
References len, palloc(), SET_VARSIZE, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Referenced by bytea_overlay(), and byteacat().
Datum bytea_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3935 of file varlena.c.
References cmp(), Min, PG_GETARG_BYTEA_PP, PG_RETURN_BYTEA_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Definition at line 3093 of file varlena.c.
References bytea_catenate(), bytea_substring(), ereport, errcode(), errmsg(), ERROR, pg_add_s32_overflow(), PointerGetDatum(), s1, and s2.
Referenced by byteaoverlay(), and byteaoverlay_no_len().
Datum bytea_smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3954 of file varlena.c.
References cmp(), Min, PG_GETARG_BYTEA_PP, PG_RETURN_BYTEA_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum bytea_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3973 of file varlena.c.
References MemoryContextSwitchTo(), PG_GETARG_POINTER, PG_RETURN_VOID, SortSupportData::ssup_cxt, and varstr_sortsupport().
Datum bytea_string_agg_finalfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 551 of file varlena.c.
References AggCheckCallContext(), Assert, palloc(), PG_ARGISNULL, PG_GETARG_POINTER, PG_RETURN_BYTEA_P, PG_RETURN_NULL, SET_VARSIZE, VARDATA, and VARHDRSZ.
Datum bytea_string_agg_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 498 of file varlena.c.
References appendBinaryStringInfo(), makeStringAggState(), PG_ARGISNULL, PG_GETARG_BYTEA_PP, PG_GETARG_POINTER, PG_RETURN_NULL, PG_RETURN_POINTER, value, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum bytea_substr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2980 of file varlena.c.
References bytea_substring(), PG_GETARG_DATUM, PG_GETARG_INT32, and PG_RETURN_BYTEA_P.
Datum bytea_substr_no_len | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2994 of file varlena.c.
References bytea_substring(), PG_GETARG_DATUM, PG_GETARG_INT32, and PG_RETURN_BYTEA_P.
Definition at line 3003 of file varlena.c.
References DatumGetByteaPSlice, ereport, errcode(), errmsg(), ERROR, Max, pg_add_s32_overflow(), PG_STR_GET_BYTEA, S, and str.
Referenced by bytea_overlay(), bytea_substr(), and bytea_substr_no_len().
Datum byteacat | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2913 of file varlena.c.
References bytea_catenate(), PG_GETARG_BYTEA_PP, and PG_RETURN_BYTEA_P.
Datum byteacmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3913 of file varlena.c.
References cmp(), Min, PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_RETURN_INT32, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by gbt_bitcmp(), and gbt_byteacmp().
Datum byteaeq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3769 of file varlena.c.
References DatumGetByteaPP, PG_FREE_IF_COPY, PG_GETARG_DATUM, PG_RETURN_BOOL, toast_raw_datum_size(), VARDATA_ANY, and VARHDRSZ.
Referenced by gbt_byteaeq().
Datum byteage | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3893 of file varlena.c.
References cmp(), Min, PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_RETURN_BOOL, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by gbt_byteage().
Datum byteaGetBit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3213 of file varlena.c.
References ereport, errcode(), errmsg(), ERROR, len, PG_GETARG_BYTEA_PP, PG_GETARG_INT64, PG_RETURN_INT32, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum byteaGetByte | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3184 of file varlena.c.
References ereport, errcode(), errmsg(), ERROR, len, PG_GETARG_BYTEA_PP, PG_GETARG_INT32, PG_RETURN_INT32, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum byteagt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3873 of file varlena.c.
References cmp(), Min, PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_RETURN_BOOL, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by gbt_byteagt().
Datum byteain | ( | PG_FUNCTION_ARGS | ) |
Definition at line 290 of file varlena.c.
References ereturn, errcode(), errmsg(), hex_decode_safe(), len, palloc(), PG_GETARG_CSTRING, PG_RETURN_BYTEA_P, SET_VARSIZE, VAL, VARDATA, and VARHDRSZ.
Referenced by CreateTriggerFiringOn(), and string_to_datum().
Datum byteale | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3853 of file varlena.c.
References cmp(), Min, PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_RETURN_BOOL, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by gbt_byteale().
Datum bytealt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3833 of file varlena.c.
References cmp(), Min, PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_RETURN_BOOL, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by gbt_bytealt().
Datum byteane | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3801 of file varlena.c.
References DatumGetByteaPP, PG_FREE_IF_COPY, PG_GETARG_DATUM, PG_RETURN_BOOL, toast_raw_datum_size(), VARDATA_ANY, and VARHDRSZ.
Datum byteaoctetlen | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2897 of file varlena.c.
References PG_GETARG_DATUM, PG_RETURN_INT32, str, toast_raw_datum_size(), and VARHDRSZ.
Datum byteaout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 388 of file varlena.c.
References bytea_output, BYTEA_OUTPUT_ESCAPE, BYTEA_OUTPUT_HEX, DIG, elog, ereport, errcode(), errmsg_internal(), ERROR, hex_encode(), i, len, MaxAllocSize, palloc(), PG_GETARG_BYTEA_PP, PG_RETURN_CSTRING, val, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by pg_mcv_list_out().
Datum byteaoverlay | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3070 of file varlena.c.
References bytea_overlay(), PG_GETARG_BYTEA_PP, PG_GETARG_INT32, and PG_RETURN_BYTEA_P.
Datum byteaoverlay_no_len | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3081 of file varlena.c.
References bytea_overlay(), PG_GETARG_BYTEA_PP, PG_GETARG_INT32, PG_RETURN_BYTEA_P, and VARSIZE_ANY_EXHDR.
Datum byteapos | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3140 of file varlena.c.
References p2, PG_GETARG_BYTEA_PP, PG_RETURN_INT32, px(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum bytearecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 471 of file varlena.c.
References buf, palloc(), PG_GETARG_POINTER, PG_RETURN_BYTEA_P, pq_copymsgbytes(), SET_VARSIZE, VARDATA, and VARHDRSZ.
Datum byteasend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 490 of file varlena.c.
References PG_GETARG_BYTEA_P_COPY, and PG_RETURN_BYTEA_P.
Referenced by brin_bloom_summary_send(), brin_minmax_multi_summary_send(), pg_dependencies_send(), pg_mcv_list_send(), and pg_ndistinct_send().
Datum byteaSetBit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3283 of file varlena.c.
References ereport, errcode(), errmsg(), ERROR, len, PG_GETARG_BYTEA_P_COPY, PG_GETARG_INT32, PG_GETARG_INT64, PG_RETURN_BYTEA_P, res, VARDATA, VARHDRSZ, and VARSIZE.
Datum byteaSetByte | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3251 of file varlena.c.
References ereport, errcode(), errmsg(), ERROR, len, PG_GETARG_BYTEA_P_COPY, PG_GETARG_INT32, PG_RETURN_BYTEA_P, res, VARDATA, VARHDRSZ, and VARSIZE.
|
static |
Definition at line 806 of file varlena.c.
References pg_database_encoding_max_length(), and pg_mblen().
Referenced by appendStringInfoRegexpSubstr(), and replace_text_regexp().
|
static |
Definition at line 1509 of file varlena.c.
References collid, ereport, errcode(), errhint(), errmsg(), ERROR, and OidIsValid.
Referenced by btvarstrequalimage(), nameeqtext(), namenetext(), text_position_setup(), text_starts_with(), texteq(), texteqname(), textne(), textnename(), varstr_cmp(), and varstr_sortsupport().
|
static |
Definition at line 4086 of file varlena.c.
References replace_text(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by replace_text_regexp().
|
static |
Definition at line 5435 of file varlena.c.
References appendStringInfoString(), array_to_text_internal(), Assert, build_concat_foutcache(), cstring_to_text_with_len(), FunctionCallInfoBaseData::flinfo, FmgrInfo::fn_extra, get_base_element_type(), get_fn_expr_argtype(), get_fn_expr_variadic(), i, if(), initStringInfo(), OidIsValid, OutputFunctionCall(), pfree(), PG_ARGISNULL, PG_GETARG_ARRAYTYPE_P, PG_GETARG_DATUM, PG_NARGS, str, and value.
Referenced by text_concat(), and text_concat_ws().
Definition at line 4943 of file varlena.c.
References Assert, BITS_PER_BYTE, buf, cstring_to_text_with_len(), digits, and value.
Referenced by to_bin32(), to_bin64(), to_hex32(), to_hex64(), to_oct32(), and to_oct64().
text * cstring_to_text | ( | const char * | s | ) |
Definition at line 184 of file varlena.c.
References cstring_to_text_with_len().
Referenced by array_dims(), ASN1_STRING_to_text(), booltext(), brin_minmax_multi_summary_out(), brin_page_type(), build_test_info_result(), build_test_match_result(), cidr_abbrev(), convert_charset(), cstring_to_xmltype(), current_query(), datetime_to_char_body(), dblink_build_sql_delete(), dblink_build_sql_insert(), dblink_build_sql_update(), dblink_cancel_query(), dblink_close(), dblink_connect(), dblink_disconnect(), dblink_error_message(), dblink_exec(), dblink_open(), dmetaphone(), dmetaphone_alt(), exec_assign_c_string(), executeDateTimeMethod(), filter_list_to_array(), format_type(), get_command_tag(), get_command_type(), get_scalar(), hash_page_type(), icu_unicode_version(), inet_abbrev(), initcap(), json_in(), json_typeof(), jsonb_get_element(), jsonb_typeof(), JsonbValueAsText(), lower(), md5_bytea(), md5_text(), metaphone(), name_bpchar(), name_text(), network_host(), network_show(), oidvectortypes(), ParameterAclCreate(), ParameterAclLookup(), pg_collation_actual_version(), pg_collation_for(), pg_column_compression(), pg_crypt(), pg_current_logfile(), pg_database_collation_actual_version(), pg_describe_object(), pg_export_snapshot(), pg_get_statisticsobjdef_expressions(), pg_get_wal_replay_pause_state(), pg_parameter_aclmask(), pg_relation_filepath(), pg_size_pretty(), pg_size_pretty_numeric(), pg_stat_get_backend_activity(), pg_stat_get_backend_wait_event(), pg_stat_get_backend_wait_event_type(), pg_stat_get_slru(), pg_stats_ext_mcvlist_items(), pg_tablespace_location(), pg_walfile_name(), pg_xact_status(), pgsql_version(), pgxml_result_to_text(), quote_ident(), quote_ident_cstr(), quote_nullable(), sepgsql_getcon(), sepgsql_mcstrans_in(), sepgsql_mcstrans_out(), set_config_by_name(), show_all_file_settings(), show_config_by_name(), show_config_by_name_missing_ok(), ShowAllGUCConfig(), soundex(), split_part(), ssl_cipher(), ssl_client_dn(), ssl_issuer_dn(), ssl_version(), string_to_text(), test_canonicalize_path(), test_slru_page_read(), test_slru_page_readonly(), text_substring(), textin(), timeofday(), timetz_at_local(), tsquerytree(), unaccent_dict(), unicode_version(), upper(), xml_encode_special_chars(), xml_in(), and xml_recv().
text * cstring_to_text_with_len | ( | const char * | s, |
int | len | ||
) |
Definition at line 196 of file varlena.c.
References len, palloc(), SET_VARSIZE, VARDATA, and VARHDRSZ.
Referenced by array_to_json(), array_to_json_pretty(), array_to_text_internal(), brin_minmax_multi_summary_out(), build_regexp_match_result(), build_regexp_split_result(), build_test_match_result(), cash_words(), compute_tsvector_stats(), concat_internal(), convert_to_base(), cstring_to_text(), daitch_mokotoff_coding(), datum_to_json(), do_text_output_multiline(), dotrim(), each_object_field_end(), each_worker_jsonb(), elements_array_element_end(), ExecEvalMergeSupportFunc(), ExecEvalXmlExpr(), executeDateTimeMethod(), executeLikeRegex(), find_or_create_child_node(), fsm_page_contents(), get_array_element_end(), get_array_end(), get_object_end(), get_object_field_end(), get_scalar(), gin_extract_tsquery(), gin_extract_tsvector(), hstore_akeys(), hstore_avals(), hstore_each(), hstore_fetchval(), hstore_skeys(), hstore_slice_to_array(), hstore_subscript_fetch(), hstore_svals(), hstore_to_array_internal(), hstore_to_json(), hstore_to_json_loose(), json_build_array_noargs(), json_build_array_worker(), json_build_object_noargs(), json_build_object_worker(), json_object(), json_object_two_arg(), json_recv(), json_strip_nulls(), jsonb_pretty(), JsonbValueAsText(), leftmostvalue_text(), LogicalOutputWrite(), parse_ident(), pg_gen_salt(), pg_gen_salt_rounds(), pg_get_function_sqlbody(), replace_text(), replace_text_regexp(), row_to_json(), row_to_json_pretty(), serialize_deflist(), split_part(), split_text(), ssl_extension_info(), string_agg_finalfn(), stringinfo_to_xmltype(), text_format(), text_left(), text_right(), textrecv(), transform_json_string_values(), tsquerytree(), tsvector_to_array(), tsvector_unnest(), unistr(), varchar(), varchar_input(), xmltext(), xmltotext_with_options(), and xslt_process().
const char * getClosestMatch | ( | ClosestMatchState * | state | ) |
Definition at line 6256 of file varlena.c.
References Assert.
Referenced by dblink_fdw_validator(), file_fdw_validator(), postgres_fdw_validator(), and postgresql_fdw_validator().
|
static |
Definition at line 6485 of file varlena.c.
Referenced by hexval_n().
|
static |
Datum icu_unicode_version | ( | PG_FUNCTION_ARGS | ) |
Definition at line 6315 of file varlena.c.
References cstring_to_text(), PG_RETURN_NULL, and PG_RETURN_TEXT_P.
Referenced by main().
void initClosestMatch | ( | ClosestMatchState * | state, |
const char * | source, | ||
int | max_d | ||
) |
Definition at line 6201 of file varlena.c.
References Assert, and source.
Referenced by dblink_fdw_validator(), file_fdw_validator(), postgres_fdw_validator(), and postgresql_fdw_validator().
Definition at line 2772 of file varlena.c.
References Min, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by bttext_pattern_cmp(), text_pattern_ge(), text_pattern_gt(), text_pattern_le(), and text_pattern_lt().
|
static |
|
static |
Definition at line 5175 of file varlena.c.
References AggCheckCallContext(), elog, ERROR, makeStringInfo(), and MemoryContextSwitchTo().
Referenced by bytea_string_agg_transfn(), string_agg_combine(), string_agg_deserialize(), and string_agg_transfn().
Datum name_text | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3357 of file varlena.c.
References cstring_to_text(), NameStr, PG_GETARG_NAME, and PG_RETURN_TEXT_P.
Referenced by nameiclike(), and nameicnlike().
Datum nameeqtext | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2575 of file varlena.c.
References check_collation_set(), collid, NameStr, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, VARDATA_ANY, VARSIZE_ANY_EXHDR, and varstr_cmp().
|
static |
Definition at line 2063 of file varlena.c.
References DatumGetName(), NAMEDATALEN, NameStr, x, and y.
Referenced by varstr_sortsupport().
|
static |
Definition at line 2106 of file varlena.c.
References DatumGetName(), NameStr, varstrfastcmp_locale(), x, and y.
Referenced by varstr_sortsupport().
Datum namegetext | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2731 of file varlena.c.
References btnametextcmp(), CmpCall, and PG_RETURN_BOOL.
Datum namegttext | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2725 of file varlena.c.
References btnametextcmp(), CmpCall, and PG_RETURN_BOOL.
Datum nameletext | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2719 of file varlena.c.
References btnametextcmp(), CmpCall, and PG_RETURN_BOOL.
Datum namelttext | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2713 of file varlena.c.
References btnametextcmp(), CmpCall, and PG_RETURN_BOOL.
Datum namenetext | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2625 of file varlena.c.
References check_collation_set(), collid, NameStr, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, VARDATA_ANY, VARSIZE_ANY_EXHDR, and varstr_cmp().
Datum pg_column_compression | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5074 of file varlena.c.
References cstring_to_text(), DatumGetPointer(), elog, ERROR, get_fn_expr_argtype(), get_typlen(), MemoryContextAlloc(), PG_GETARG_DATUM, PG_RETURN_NULL, PG_RETURN_TEXT_P, toast_get_compression_id(), TOAST_INVALID_COMPRESSION_ID, TOAST_LZ4_COMPRESSION_ID, and TOAST_PGLZ_COMPRESSION_ID.
Datum pg_column_size | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5027 of file varlena.c.
References DatumGetCString(), elog, ERROR, get_fn_expr_argtype(), get_typlen(), MemoryContextAlloc(), PG_GETARG_DATUM, PG_RETURN_INT32, toast_datum_size(), and value.
Datum pg_column_toast_chunk_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5127 of file varlena.c.
References DatumGetPointer(), elog, ERROR, get_fn_expr_argtype(), get_typlen(), MemoryContextAlloc(), PG_GETARG_DATUM, PG_RETURN_NULL, PG_RETURN_OID, varatt_external::va_valueid, VARATT_EXTERNAL_GET_POINTER, and VARATT_IS_EXTERNAL_ONDISK.
Datum replace_text | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4009 of file varlena.c.
References appendBinaryStringInfo(), appendStringInfoText(), CHECK_FOR_INTERRUPTS, cstring_to_text_with_len(), initStringInfo(), pfree(), PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, str, text_position_cleanup(), text_position_get_match_ptr(), text_position_next(), text_position_setup(), VARDATA_ANY, VARSIZE_ANY, and VARSIZE_ANY_EXHDR.
Referenced by appendStringInfoRegexpSubstr(), check_replace_text_has_escape(), execute_extension_script(), and replace_text_regexp().
text * replace_text_regexp | ( | text * | src_text, |
text * | pattern_text, | ||
text * | replace_text, | ||
int | cflags, | ||
Oid | collation, | ||
int | search_start, | ||
int | n | ||
) |
Definition at line 4219 of file varlena.c.
References appendBinaryStringInfo(), appendStringInfoRegexpSubstr(), appendStringInfoText(), buf, charlen_to_bytelen(), CHECK_FOR_INTERRUPTS, check_replace_text_has_escape(), cstring_to_text_with_len(), data, ereport, errcode(), errmsg(), ERROR, initStringInfo(), lengthof, palloc(), pfree(), pg_mb2wchar_with_len(), pg_regerror(), pg_regexec(), RE_compile_and_cache(), REG_NOMATCH, REG_NOSUB, REG_OKAY, regex_t, regmatch_t, replace_text(), VARDATA_ANY, VARSIZE_ANY, and VARSIZE_ANY_EXHDR.
Referenced by textregexreplace(), textregexreplace_extended(), and textregexreplace_noopt().
|
inlinestatic |
Datum split_part | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4381 of file varlena.c.
References Assert, cstring_to_text(), cstring_to_text_with_len(), ereport, errcode(), errmsg(), ERROR, PG_GET_COLLATION, PG_GETARG_INT32, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, text_position_cleanup(), text_position_get_match_ptr(), text_position_next(), text_position_reset(), text_position_setup(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
|
static |
Definition at line 4604 of file varlena.c.
References CHECK_FOR_INTERRUPTS, cstring_to_text_with_len(), pfree(), PG_ARGISNULL, PG_GET_COLLATION, PG_GETARG_TEXT_PP, pg_mblen(), PG_NARGS, split_text_accum_result(), text_position_cleanup(), text_position_get_match_ptr(), text_position_next(), text_position_setup(), VARDATA_ANY, VARSIZE_ANY, and VARSIZE_ANY_EXHDR.
Referenced by text_to_array(), and text_to_table().
|
static |
Definition at line 4740 of file varlena.c.
References accumArrayResult(), SplitTextOutputData::astate, CurrentMemoryContext, PointerGetDatum(), text_isequal(), SplitTextOutputData::tupdesc, tuplestore_putvalues(), SplitTextOutputData::tupstore, and values.
Referenced by split_text().
bool SplitDirectoriesString | ( | char * | rawstring, |
char | separator, | ||
List ** | namelist | ||
) |
Definition at line 3559 of file varlena.c.
References canonicalize_path(), lappend(), MAXPGPATH, NIL, pstrdup(), and scanner_isspace().
Referenced by load_libraries(), and PostmasterMain().
bool SplitGUCList | ( | char * | rawstring, |
char | separator, | ||
List ** | namelist | ||
) |
Definition at line 3680 of file varlena.c.
References lappend(), NIL, and scanner_isspace().
Referenced by check_debug_io_direct(), dumpFunc(), parse_hba_auth_opt(), pg_get_functiondef(), and PostmasterMain().
bool SplitIdentifierString | ( | char * | rawstring, |
char | separator, | ||
List ** | namelist | ||
) |
Definition at line 3432 of file varlena.c.
References Assert, downcase_truncate_identifier(), lappend(), len, NIL, pfree(), scanner_isspace(), and truncate_identifier().
Referenced by check_createrole_self_grant(), check_datestyle(), check_log_destination(), check_restrict_nonsystem_relation_kind(), check_search_path(), check_temp_tablespaces(), check_wal_consistency_checking(), ExtractExtensionList(), parse_extension_control_file(), parse_output_parameters(), parse_publication_options(), plpgsql_extra_checks_check_hook(), PrepareTempTablespaces(), preprocessNamespacePath(), stringToQualifiedNameList(), textToQualifiedNameList(), and validate_sync_standby_slots().
Datum string_agg_combine | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5254 of file varlena.c.
References AggCheckCallContext(), appendBinaryStringInfo(), StringInfoData::cursor, StringInfoData::data, elog, ERROR, StringInfoData::len, makeStringAggState(), MemoryContextSwitchTo(), PG_ARGISNULL, PG_GETARG_POINTER, PG_RETURN_NULL, and PG_RETURN_POINTER.
Datum string_agg_deserialize | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5335 of file varlena.c.
References AggCheckCallContext(), appendBinaryStringInfo(), Assert, buf, StringInfoData::cursor, data, initReadOnlyStringInfo(), makeStringAggState(), PG_GETARG_BYTEA_PP, PG_RETURN_POINTER, pq_getmsgbytes(), pq_getmsgend(), pq_getmsgint(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum string_agg_finalfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5371 of file varlena.c.
References AggCheckCallContext(), Assert, cstring_to_text_with_len(), PG_ARGISNULL, PG_GETARG_POINTER, PG_RETURN_NULL, and PG_RETURN_TEXT_P.
Datum string_agg_serialize | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5304 of file varlena.c.
References AggCheckCallContext(), Assert, buf, PG_GETARG_POINTER, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendbytes(), and pq_sendint().
Datum string_agg_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5199 of file varlena.c.
References appendStringInfoText(), makeStringAggState(), PG_ARGISNULL, PG_GETARG_POINTER, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_POINTER, value, and VARSIZE_ANY_EXHDR.
Definition at line 765 of file varlena.c.
References len, palloc(), SET_VARSIZE, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Referenced by text_overlay(), and textcat().
Definition at line 1586 of file varlena.c.
References collid, VARDATA_ANY, VARSIZE_ANY_EXHDR, and varstr_cmp().
Referenced by bttextcmp(), text_ge(), text_gt(), text_larger(), text_le(), text_lt(), text_smaller(), texteq(), and textne().
Datum text_concat | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5515 of file varlena.c.
References concat_internal(), PG_RETURN_NULL, and PG_RETURN_TEXT_P.
Datum text_concat_ws | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5530 of file varlena.c.
References concat_internal(), PG_ARGISNULL, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, and text_to_cstring().
Datum text_format | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5651 of file varlena.c.
References ADVANCE_PARSE_POINTER, appendStringInfoCharMacro, arg, ARR_ELEMTYPE, Assert, cstring_to_text_with_len(), DatumGetInt16(), DatumGetInt32(), deconstruct_array(), elog, ereport, errcode(), errhint(), errmsg(), ERROR, fmgr_info(), fmt, get_base_element_type(), get_fn_expr_argtype(), get_fn_expr_variadic(), get_typlenbyvalalign(), getTypeOutputInfo(), initStringInfo(), InvalidOid, nitems, OidIsValid, OutputFunctionCall(), pfree(), PG_ARGISNULL, PG_GETARG_ARRAYTYPE_P, PG_GETARG_DATUM, PG_GETARG_TEXT_PP, pg_mblen(), PG_NARGS, PG_RETURN_NULL, PG_RETURN_TEXT_P, pg_strtoint32(), str, text_format_parse_format(), text_format_string_conversion(), value, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by text_format_nv().
|
static |
Definition at line 6103 of file varlena.c.
References appendStringInfoSpaces(), appendStringInfoString(), buf, ereport, errcode(), errmsg(), ERROR, len, pg_mbstrlen(), str, and TEXT_FORMAT_FLAG_MINUS.
Referenced by text_format_string_conversion().
Datum text_format_nv | ( | PG_FUNCTION_ARGS | ) |
|
static |
Definition at line 5928 of file varlena.c.
References ADVANCE_PARSE_POINTER, ereport, errcode(), errmsg(), ERROR, pg_add_s32_overflow(), pg_mul_s32_overflow(), unlikely, val, and value.
Referenced by text_format_parse_format().
|
static |
Definition at line 5977 of file varlena.c.
References ADVANCE_PARSE_POINTER, ereport, errcode(), errmsg(), ERROR, TEXT_FORMAT_FLAG_MINUS, and text_format_parse_digits().
Referenced by text_format().
|
static |
Definition at line 6054 of file varlena.c.
References buf, ereport, errcode(), errmsg(), ERROR, OutputFunctionCall(), pfree(), quote_identifier(), quote_literal_cstr(), str, text_format_append_string(), and value.
Referenced by text_format().
Datum text_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1760 of file varlena.c.
References PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and text_cmp().
Referenced by gbt_textge().
Datum text_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1745 of file varlena.c.
References PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and text_cmp().
Referenced by gbt_textgt().
Definition at line 4513 of file varlena.c.
References collid, DatumGetBool(), DirectFunctionCall2Coll(), PointerGetDatum(), and texteq().
Referenced by split_text_accum_result().
Datum text_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2546 of file varlena.c.
References PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, and text_cmp().
Datum text_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1730 of file varlena.c.
References PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and text_cmp().
Referenced by gbt_textle().
Datum text_left | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5551 of file varlena.c.
References cstring_to_text_with_len(), len, PG_GETARG_DATUM, PG_GETARG_INT32, PG_GETARG_TEXT_PP, pg_mbcharcliplen(), pg_mbstrlen_with_len(), PG_RETURN_TEXT_P, str, text_substring(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Definition at line 711 of file varlena.c.
References DatumGetTextPP, pg_database_encoding_max_length(), pg_mbstrlen_with_len(), PG_RETURN_INT32, str, toast_raw_datum_size(), VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Referenced by textlen(), and textoverlay_no_len().
Datum text_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1715 of file varlena.c.
References PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and text_cmp().
Referenced by gbt_textlt().
Datum text_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3334 of file varlena.c.
References len, NAMEDATALEN, NameStr, palloc0(), PG_GETARG_TEXT_PP, pg_mbcliplen(), PG_RETURN_NAME, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Definition at line 1116 of file varlena.c.
References ereport, errcode(), errmsg(), ERROR, pg_add_s32_overflow(), PointerGetDatum(), s1, s2, text_catenate(), and text_substring().
Referenced by textoverlay(), and textoverlay_no_len().
Datum text_pattern_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2826 of file varlena.c.
References internal_text_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum text_pattern_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2842 of file varlena.c.
References internal_text_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum text_pattern_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2810 of file varlena.c.
References internal_text_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum text_pattern_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2794 of file varlena.c.
References internal_text_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Definition at line 1176 of file varlena.c.
References collid, text_position_cleanup(), text_position_get_match_pos(), text_position_next(), text_position_setup(), and VARSIZE_ANY_EXHDR.
Referenced by textpos().
|
static |
Definition at line 1502 of file varlena.c.
Referenced by replace_text(), split_part(), split_text(), and text_position().
|
static |
Definition at line 1478 of file varlena.c.
References pg_mbstrlen_with_len().
Referenced by text_position().
|
static |
Definition at line 1467 of file varlena.c.
Referenced by replace_text(), split_part(), and split_text().
|
static |
Definition at line 1335 of file varlena.c.
References Assert, pg_mblen(), and text_position_next_internal().
Referenced by replace_text(), split_part(), split_text(), and text_position().
|
static |
Definition at line 1399 of file varlena.c.
References Assert.
Referenced by text_position_next().
|
static |
|
static |
Definition at line 1216 of file varlena.c.
References Assert, check_collation_set(), collid, pg_locale_struct::deterministic, ereport, errcode(), errmsg(), ERROR, for(), GetDatabaseEncoding(), i, pg_database_encoding_max_length(), pg_newlocale_from_collation(), PG_UTF8, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by replace_text(), split_part(), split_text(), and text_position().
Datum text_reverse | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5596 of file varlena.c.
References len, palloc(), pg_database_encoding_max_length(), PG_GETARG_TEXT_PP, pg_mblen(), PG_RETURN_TEXT_P, SET_VARSIZE, str, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum text_right | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5575 of file varlena.c.
References cstring_to_text_with_len(), len, PG_GETARG_INT32, PG_GETARG_TEXT_PP, pg_mbcharcliplen(), pg_mbstrlen_with_len(), PG_RETURN_TEXT_P, str, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum text_smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2558 of file varlena.c.
References PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, and text_cmp().
Datum text_starts_with | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1775 of file varlena.c.
References check_collation_set(), collid, DatumGetTextPP, pg_locale_struct::deterministic, ereport, errcode(), errmsg(), ERROR, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_DATUM, pg_newlocale_from_collation(), PG_RETURN_BOOL, text_substring(), toast_raw_datum_size(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by spg_text_leaf_consistent().
Datum text_substr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 852 of file varlena.c.
References PG_GETARG_DATUM, PG_GETARG_INT32, PG_RETURN_TEXT_P, and text_substring().
Referenced by build_regexp_match_result(), build_regexp_split_result(), build_test_match_result(), regexp_substr(), and textregexsubstr().
Datum text_substr_no_len | ( | PG_FUNCTION_ARGS | ) |
Definition at line 866 of file varlena.c.
References PG_GETARG_DATUM, PG_GETARG_INT32, PG_RETURN_TEXT_P, and text_substring().
|
static |
Definition at line 885 of file varlena.c.
References cstring_to_text(), DatumGetPointer(), DatumGetTextPSlice, elog, ereport, errcode(), errmsg(), ERROR, i, Max, Min, palloc(), pfree(), pg_add_s32_overflow(), pg_database_encoding_max_length(), pg_mblen(), pg_mbstrlen_with_len(), pg_mul_s32_overflow(), S, SET_VARSIZE, start, str, VARATT_IS_COMPRESSED, VARATT_IS_EXTERNAL, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Referenced by text_left(), text_overlay(), text_starts_with(), text_substr(), and text_substr_no_len().
Datum text_to_array | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4527 of file varlena.c.
References SplitTextOutputData::astate, construct_empty_array(), CurrentMemoryContext, makeArrayResult(), PG_RETURN_ARRAYTYPE_P, PG_RETURN_DATUM, PG_RETURN_NULL, and split_text().
Referenced by text_to_array_null().
Datum text_to_array_null | ( | PG_FUNCTION_ARGS | ) |
char * text_to_cstring | ( | const text * | t | ) |
Definition at line 217 of file varlena.c.
References len, palloc(), pfree(), pg_detoast_datum_packed(), unconstify, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by array_to_text(), array_to_text_null(), binary_upgrade_add_sub_rel_state(), binary_upgrade_create_empty_extension(), binary_upgrade_replorigin_advance(), binary_upgrade_set_missing_value(), connectby_text(), connectby_text_serial(), convert_and_check_filename(), convert_any_priv_string(), convert_column_name(), convert_database_name(), convert_foreign_data_wrapper_name(), convert_function_name(), convert_language_name(), convert_schema_name(), convert_server_name(), convert_tablespace_name(), convert_type_name(), crosstab(), crosstab_hash(), cursor_to_xml(), cursor_to_xmlschema(), daitch_mokotoff(), database_to_xml(), database_to_xml_and_xmlschema(), database_to_xmlschema(), datetime_to_char_body(), dblink_cancel_query(), dblink_close(), dblink_connect(), dblink_disconnect(), dblink_error_message(), dblink_exec(), dblink_fetch(), dblink_get_notify(), dblink_is_busy(), dblink_open(), dblink_record_internal(), dblink_send_query(), deserialize_deflist(), difference(), dmetaphone(), dmetaphone_alt(), do_to_timestamp(), ExecAlterExtensionStmt(), execute_extension_script(), executeDateTimeMethod(), get_raw_page_fork(), get_raw_page_fork_1_9(), has_param_priv_byname(), has_sequence_privilege_id_name(), has_sequence_privilege_name(), has_sequence_privilege_name_name(), injection_points_attach(), injection_points_cached(), injection_points_detach(), injection_points_load(), injection_points_run(), injection_points_stats_numcalls(), injection_points_wakeup(), json_object_field(), json_object_field_text(), jsonb_set_lax(), JsonItemFromDatum(), ltree_addtext(), ltree_textadd(), NUM_cache(), parse_datetime(), parse_ident(), pg_backup_start(), pg_create_restore_point(), pg_crypt(), pg_current_logfile(), pg_get_expr_worker(), pg_get_logical_snapshot_info(), pg_get_logical_snapshot_meta(), pg_get_serial_sequence(), pg_index_column_has_property(), pg_index_has_property(), pg_indexam_has_property(), pg_input_is_valid_common(), pg_logical_emit_message_bytea(), pg_ls_replslotdir(), pg_notify(), pg_prewarm(), pg_relation_size(), pg_replication_origin_advance(), pg_replication_origin_create(), pg_replication_origin_drop(), pg_replication_origin_oid(), pg_replication_origin_progress(), pg_replication_origin_session_setup(), pg_size_bytes(), pg_split_walfile_name(), pg_stat_get_progress_info(), pg_stat_get_replication_slot(), pg_stat_have_stats(), pg_stat_reset_replication_slot(), pg_stat_reset_shared(), pg_stat_reset_slru(), pgxml_texttoxmlchar(), phraseto_tsquery_byid(), plainto_tsquery_byid(), postgres_fdw_disconnect(), query_to_xml(), query_to_xml_and_xmlschema(), query_to_xmlschema(), quote_ident(), quote_ident_cstr(), range_constructor3(), regress_setenv(), replorigin_by_oid(), schema_to_xml(), schema_to_xml_and_xmlschema(), schema_to_xmlschema(), sepgsql_mcstrans_in(), sepgsql_mcstrans_out(), soundex(), table_to_xml(), table_to_xml_and_xmlschema(), table_to_xmlschema(), test_canonicalize_path(), test_predtest(), test_slru_page_write(), text2ltree(), text_concat_ws(), textToQualifiedNameList(), to_date(), to_regclass(), to_regcollation(), to_regnamespace(), to_regoper(), to_regoperator(), to_regproc(), to_regprocedure(), to_regrole(), to_regtype(), to_regtypemod(), to_tsquery_byid(), ts_stat_sql(), tsquery_rewrite_query(), tuple_data_split(), unicode_is_normalized(), unicode_normalize_func(), verify_heapam(), websearch_to_tsquery_byid(), X509_NAME_field_to_text(), xml_out_internal(), xmlconcat(), xmlpi(), xmlroot(), and xpath_table().
void text_to_cstring_buffer | ( | const text * | src, |
char * | dst, | ||
size_t | dst_len | ||
) |
Definition at line 248 of file varlena.c.
References pfree(), pg_detoast_datum_packed(), pg_mbcliplen(), unconstify, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by be_lo_export(), lo_import_internal(), lookup_timezone(), parse_sane_timezone(), pg_gen_salt(), pg_gen_salt_rounds(), timestamp_zone(), timestamptz_zone(), and timetz_zone().
Datum text_to_table | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4564 of file varlena.c.
References SplitTextOutputData::astate, InitMaterializedSRF(), MAT_SRF_USE_EXPECTED_DESC, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, and split_text().
Referenced by text_to_table_null().
Datum text_to_table_null | ( | PG_FUNCTION_ARGS | ) |
Datum textcat | ( | PG_FUNCTION_ARGS | ) |
Definition at line 750 of file varlena.c.
References PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, and text_catenate().
Datum texteq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1611 of file varlena.c.
References check_collation_set(), collid, DatumGetTextPP, pg_locale_struct::deterministic, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_DATUM, PG_GETARG_TEXT_PP, pg_newlocale_from_collation(), PG_RETURN_BOOL, text_cmp(), toast_raw_datum_size(), VARDATA_ANY, and VARHDRSZ.
Referenced by gbt_texteq(), text_isequal(), and texteqfast().
Datum texteqname | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2600 of file varlena.c.
References check_collation_set(), collid, NameStr, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, VARDATA_ANY, VARSIZE_ANY_EXHDR, and varstr_cmp().
Datum textgename | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2755 of file varlena.c.
References bttextnamecmp(), CmpCall, and PG_RETURN_BOOL.
Datum textgtname | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2749 of file varlena.c.
References bttextnamecmp(), CmpCall, and PG_RETURN_BOOL.
Datum textin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 579 of file varlena.c.
References cstring_to_text(), PG_GETARG_CSTRING, and PG_RETURN_TEXT_P.
Referenced by ExecEvalJsonExprPath().
Datum textlen | ( | PG_FUNCTION_ARGS | ) |
Definition at line 693 of file varlena.c.
References PG_GETARG_DATUM, PG_RETURN_INT32, str, and text_length().
Datum textlename | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2743 of file varlena.c.
References bttextnamecmp(), CmpCall, and PG_RETURN_BOOL.
Datum textltname | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2737 of file varlena.c.
References bttextnamecmp(), CmpCall, and PG_RETURN_BOOL.
Datum textne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1666 of file varlena.c.
References check_collation_set(), collid, DatumGetTextPP, pg_locale_struct::deterministic, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_DATUM, PG_GETARG_TEXT_PP, pg_newlocale_from_collation(), PG_RETURN_BOOL, text_cmp(), toast_raw_datum_size(), VARDATA_ANY, and VARHDRSZ.
Datum textnename | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2650 of file varlena.c.
References check_collation_set(), collid, NameStr, PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, VARDATA_ANY, VARSIZE_ANY_EXHDR, and varstr_cmp().
Datum textoctetlen | ( | PG_FUNCTION_ARGS | ) |
Definition at line 731 of file varlena.c.
References PG_GETARG_DATUM, PG_RETURN_INT32, str, toast_raw_datum_size(), and VARHDRSZ.
Datum textout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 590 of file varlena.c.
References PG_GETARG_DATUM, PG_RETURN_CSTRING, and TextDatumGetCString.
Referenced by pg_node_tree_out(), plsample_func_handler(), and plsample_trigger_handler().
Datum textoverlay | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1093 of file varlena.c.
References PG_GETARG_INT32, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, and text_overlay().
Datum textoverlay_no_len | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1104 of file varlena.c.
References PG_GETARG_INT32, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, PointerGetDatum(), text_length(), and text_overlay().
Datum textpos | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1153 of file varlena.c.
References PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_INT32, str, and text_position().
Datum textrecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 601 of file varlena.c.
References buf, cstring_to_text_with_len(), pfree(), PG_GETARG_POINTER, PG_RETURN_TEXT_P, pq_getmsgtext(), and str.
Datum textsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 619 of file varlena.c.
References buf, PG_GETARG_TEXT_PP, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendtext(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by bpcharsend(), pg_node_tree_send(), and varcharsend().
Definition at line 3374 of file varlena.c.
References ereport, errcode(), errmsg(), ERROR, lappend(), lfirst, list_free(), makeString(), NIL, pfree(), pstrdup(), SplitIdentifierString(), and text_to_cstring().
Referenced by bt_metap(), bt_multi_page_stats(), bt_page_items_internal(), bt_page_stats_internal(), convert_table_name(), currtid_byrelname(), get_raw_page_internal(), get_rel_from_relname(), nextval(), pg_get_serial_sequence(), pg_get_viewdef_name(), pg_get_viewdef_name_ext(), pg_relpages(), pg_relpages_v1_5(), pgrowlocks(), pgstatindex(), pgstatindex_v1_5(), pgstattuple(), pgstattuple_v1_5(), row_security_active_name(), text_regclass(), ts_parse_byname(), and ts_token_type_byname().
Datum to_bin32 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4969 of file varlena.c.
References convert_to_base(), PG_GETARG_INT32, PG_RETURN_TEXT_P, and value.
Datum to_bin64 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4976 of file varlena.c.
References convert_to_base(), PG_GETARG_INT64, PG_RETURN_TEXT_P, and value.
Datum to_hex32 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5007 of file varlena.c.
References convert_to_base(), PG_GETARG_INT32, PG_RETURN_TEXT_P, and value.
Referenced by gin_page_opaque_info(), and gist_page_opaque_info().
Datum to_hex64 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 5014 of file varlena.c.
References convert_to_base(), PG_GETARG_INT64, PG_RETURN_TEXT_P, and value.
Datum to_oct32 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4988 of file varlena.c.
References convert_to_base(), PG_GETARG_INT32, PG_RETURN_TEXT_P, and value.
Datum to_oct64 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4995 of file varlena.c.
References convert_to_base(), PG_GETARG_INT64, PG_RETURN_TEXT_P, and value.
Datum unicode_assigned | ( | PG_FUNCTION_ARGS | ) |
Definition at line 6329 of file varlena.c.
References ereport, errmsg(), ERROR, GetDatabaseEncoding(), i, input, PG_GETARG_TEXT_PP, pg_mbstrlen_with_len(), PG_RETURN_BOOL, PG_U_UNASSIGNED, PG_UTF8, pg_utf_mblen, size, unicode_category(), utf8_to_unicode(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum unicode_is_normalized | ( | PG_FUNCTION_ARGS | ) |
Definition at line 6423 of file varlena.c.
References Assert, i, input, palloc(), PG_GETARG_TEXT_PP, pg_mbstrlen_with_len(), PG_RETURN_BOOL, pg_utf_mblen, size, text_to_cstring(), unicode_is_normalized_quickcheck(), unicode_norm_form_from_string(), UNICODE_NORM_QC_NO, UNICODE_NORM_QC_YES, unicode_normalize(), utf8_to_unicode(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
|
static |
Definition at line 6269 of file varlena.c.
References ereport, errcode(), errmsg(), ERROR, GetDatabaseEncoding(), pg_strcasecmp(), PG_UTF8, UNICODE_NFC, UNICODE_NFD, UNICODE_NFKC, and UNICODE_NFKD.
Referenced by unicode_is_normalized(), and unicode_normalize_func().
Datum unicode_normalize_func | ( | PG_FUNCTION_ARGS | ) |
Definition at line 6357 of file varlena.c.
References Assert, buf, i, input, palloc(), PG_GETARG_TEXT_PP, pg_mbstrlen_with_len(), PG_RETURN_TEXT_P, pg_utf_mblen, SET_VARSIZE, size, text_to_cstring(), unicode_norm_form_from_string(), unicode_normalize(), unicode_to_utf8(), utf8_to_unicode(), VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum unicode_version | ( | PG_FUNCTION_ARGS | ) |
Definition at line 6306 of file varlena.c.
References cstring_to_text(), PG_RETURN_TEXT_P, and PG_UNICODE_VERSION.
Datum unistr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 6515 of file varlena.c.
References appendStringInfoChar(), appendStringInfoString(), cstring_to_text_with_len(), ereport, errcode(), errhint(), errmsg(), ERROR, hexval_n(), initStringInfo(), is_utf16_surrogate_first(), is_utf16_surrogate_second(), is_valid_unicode_codepoint(), isxdigits_n(), len, MAX_UNICODE_EQUIVALENT_STRING, pfree(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, pg_unicode_to_server(), str, surrogate_pair_to_codepoint(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum unknownin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 634 of file varlena.c.
References PG_GETARG_CSTRING, PG_RETURN_CSTRING, pstrdup(), and str.
Datum unknownout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 646 of file varlena.c.
References PG_GETARG_CSTRING, PG_RETURN_CSTRING, pstrdup(), and str.
Datum unknownrecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 658 of file varlena.c.
References buf, PG_GETARG_POINTER, PG_RETURN_CSTRING, pq_getmsgtext(), and str.
Datum unknownsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 673 of file varlena.c.
References buf, PG_GETARG_CSTRING, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendtext(), and str.
void updateClosestMatch | ( | ClosestMatchState * | state, |
const char * | candidate | ||
) |
Definition at line 6221 of file varlena.c.
References Assert, MAX_LEVENSHTEIN_STRLEN, and varstr_levenshtein_less_equal().
Referenced by dblink_fdw_validator(), file_fdw_validator(), postgres_fdw_validator(), and postgresql_fdw_validator().
|
static |
Definition at line 2075 of file varlena.c.
References DatumGetVarStringPP, pfree(), PointerGetDatum(), VARDATA_ANY, VARSIZE_ANY_EXHDR, varstrfastcmp_locale(), x, and y.
Referenced by varstr_sortsupport().
|
static |
Definition at line 2418 of file varlena.c.
References VarStringSortSupport::abbr_card, SortSupportData::abbreviate, Assert, elog, estimateHyperLogLog(), VarStringSortSupport::full_card, LOG, VarStringSortSupport::prop_card, SortSupportData::ssup_extra, and trace_sort.
Referenced by varstr_sortsupport().
|
static |
Definition at line 2220 of file varlena.c.
References VarStringSortSupport::abbr_card, addHyperLogLog(), bpchartruelen(), VarStringSortSupport::buf1, VarStringSortSupport::buf2, VarStringSortSupport::buflen1, VarStringSortSupport::buflen2, VarStringSortSupport::cache_blob, VarStringSortSupport::collate_c, DatumGetUInt32(), DatumGetVarStringPP, VarStringSortSupport::full_card, hash(), hash_any(), hash_uint32(), VarStringSortSupport::last_len1, VarStringSortSupport::last_len2, len, VarStringSortSupport::locale, Max, MaxAllocSize, Min, pfree(), PG_CACHE_LINE_SIZE, pg_strxfrm(), pg_strxfrm_prefix(), pg_strxfrm_prefix_enabled(), PointerGetDatum(), repalloc(), res, SortSupportData::ssup_extra, VarStringSortSupport::typid, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by varstr_sortsupport().
int varstr_cmp | ( | const char * | arg1, |
int | len1, | ||
const char * | arg2, | ||
int | len2, | ||
Oid | collid | ||
) |
Definition at line 1538 of file varlena.c.
References check_collation_set(), pg_locale_struct::collate_is_c, collid, pg_locale_struct::deterministic, Min, pg_newlocale_from_collation(), and pg_strncoll().
Referenced by bpchar_larger(), bpchar_smaller(), bpcharcmp(), bpchareq(), bpcharge(), bpchargt(), bpcharle(), bpcharlt(), bpcharne(), btnametextcmp(), bttextnamecmp(), citextcmp(), compareJsonbScalarValue(), gin_compare_jsonb(), make_greater_string(), namecmp(), nameeqtext(), namenetext(), spg_text_leaf_consistent(), text_cmp(), texteqname(), and textnename().
void varstr_sortsupport | ( | SortSupport | ssup, |
Oid | typid, | ||
Oid | collid | ||
) |
Definition at line 1856 of file varlena.c.
References VarStringSortSupport::abbr_card, SortSupportData::abbrev_abort, SortSupportData::abbrev_converter, SortSupportData::abbrev_full_comparator, SortSupportData::abbreviate, bpcharfastcmp_c(), VarStringSortSupport::buf1, VarStringSortSupport::buf2, VarStringSortSupport::buflen1, VarStringSortSupport::buflen2, VarStringSortSupport::cache_blob, check_collation_set(), VarStringSortSupport::collate_c, collid, SortSupportData::comparator, VarStringSortSupport::full_card, initHyperLogLog(), VarStringSortSupport::last_len1, VarStringSortSupport::last_len2, VarStringSortSupport::last_returned, VarStringSortSupport::locale, locale, namefastcmp_c(), namefastcmp_locale(), palloc(), pg_newlocale_from_collation(), pg_strxfrm_enabled(), VarStringSortSupport::prop_card, ssup_datum_unsigned_cmp(), SortSupportData::ssup_extra, TEXTBUFLEN, VarStringSortSupport::typid, varlenafastcmp_locale(), varstr_abbrev_abort(), varstr_abbrev_convert(), and varstrfastcmp_c().
Referenced by bpchar_sortsupport(), btbpchar_pattern_sortsupport(), btnamesortsupport(), bttext_pattern_sortsupport(), bttextsortsupport(), and bytea_sortsupport().
|
static |
Definition at line 1993 of file varlena.c.
References DatumGetVarStringPP, Min, pfree(), PointerGetDatum(), VARDATA_ANY, VARSIZE_ANY_EXHDR, x, and y.
Referenced by varstr_sortsupport().
|
static |
Definition at line 2120 of file varlena.c.
References bpchartruelen(), VarStringSortSupport::buf1, VarStringSortSupport::buf2, VarStringSortSupport::buflen1, VarStringSortSupport::buflen2, VarStringSortSupport::cache_blob, pg_locale_struct::deterministic, if(), VarStringSortSupport::last_len1, VarStringSortSupport::last_len2, VarStringSortSupport::last_returned, VarStringSortSupport::locale, Max, MaxAllocSize, Min, pg_strcoll(), repalloc(), SortSupportData::ssup_extra, and VarStringSortSupport::typid.
Referenced by namefastcmp_locale(), and varlenafastcmp_locale().
int bytea_output = BYTEA_OUTPUT_HEX |
Definition at line 48 of file varlena.c.
Referenced by byteaout().