PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | ClosestMatchState |
Typedefs | |
typedef struct ClosestMatchState | ClosestMatchState |
Functions | |
int | varstr_cmp (const char *arg1, int len1, const char *arg2, int len2, Oid collid) |
void | varstr_sortsupport (SortSupport ssup, Oid typid, Oid collid) |
int | varstr_levenshtein (const char *source, int slen, const char *target, int tlen, int ins_c, int del_c, int sub_c, bool trusted) |
int | varstr_levenshtein_less_equal (const char *source, int slen, const char *target, int tlen, int ins_c, int del_c, int sub_c, int max_d, bool trusted) |
List * | textToQualifiedNameList (text *textval) |
bool | SplitIdentifierString (char *rawstring, char separator, List **namelist) |
bool | SplitDirectoriesString (char *rawstring, char separator, List **namelist) |
bool | SplitGUCList (char *rawstring, char separator, List **namelist) |
text * | replace_text_regexp (text *src_text, text *pattern_text, text *replace_text, int cflags, Oid collation, int search_start, int n) |
void | initClosestMatch (ClosestMatchState *state, const char *source, int max_d) |
void | updateClosestMatch (ClosestMatchState *state, const char *candidate) |
const char * | getClosestMatch (ClosestMatchState *state) |
typedef struct ClosestMatchState ClosestMatchState |
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().
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().
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().
Definition at line 3559 of file varlena.c.
References canonicalize_path(), lappend(), MAXPGPATH, NIL, pstrdup(), and scanner_isspace().
Referenced by load_libraries(), and PostmasterMain().
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().
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().
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().
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().
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().
int varstr_levenshtein | ( | const char * | source, |
int | slen, | ||
const char * | target, | ||
int | tlen, | ||
int | ins_c, | ||
int | del_c, | ||
int | sub_c, | ||
bool | trusted | ||
) |
Definition at line 73 of file levenshtein.c.
References ereport, errcode(), errmsg(), ERROR, i, j, MAX_LEVENSHTEIN_STRLEN, Min, palloc(), pg_mblen(), pg_mbstrlen_with_len(), rest_of_char_same(), source, START_COLUMN, STOP_COLUMN, x, and y.
Referenced by levenshtein(), and levenshtein_with_costs().
int varstr_levenshtein_less_equal | ( | const char * | source, |
int | slen, | ||
const char * | target, | ||
int | tlen, | ||
int | ins_c, | ||
int | del_c, | ||
int | sub_c, | ||
int | max_d, | ||
bool | trusted | ||
) |
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().