|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <ctype.h>#include "utils/builtins.h"#include "utils/varlena.h"#include "varatt.h"
Go to the source code of this file.
Variables | |
| static const char *const | soundex_table = "01230120022455012623010202" |
| static const char | _codes [26] |
| #define After_Next_Letter (Next_Letter != '\0' ? pg_ascii_toupper((unsigned char) word[w_idx+2]) : '\0') |
Definition at line 318 of file fuzzystrmatch.c.
Definition at line 311 of file fuzzystrmatch.c.
| #define End_Phoned_Word do {(*phoned_word)[p_idx] = '\0';} while (0) |
Definition at line 343 of file fuzzystrmatch.c.
Definition at line 348 of file fuzzystrmatch.c.
Definition at line 320 of file fuzzystrmatch.c.
| #define Look_Back_Letter | ( | n | ) | (w_idx >= (n) ? pg_ascii_toupper((unsigned char) word[w_idx-(n)]) : '\0') |
Definition at line 313 of file fuzzystrmatch.c.
| #define MAX_METAPHONE_STRLEN 255 |
Definition at line 75 of file fuzzystrmatch.c.
Definition at line 309 of file fuzzystrmatch.c.
Definition at line 345 of file fuzzystrmatch.c.
Definition at line 341 of file fuzzystrmatch.c.
| #define Prev_Letter (Look_Back_Letter(1)) |
Definition at line 316 of file fuzzystrmatch.c.
Definition at line 106 of file fuzzystrmatch.c.
| #define SOUNDEX_LEN 4 |
Definition at line 57 of file fuzzystrmatch.c.
| #define TH '0' |
Definition at line 107 of file fuzzystrmatch.c.
Definition at line 352 of file fuzzystrmatch.c.
References AFFECTH, After_Next_Letter, ascii_isalpha(), Curr_Letter, elog, End_Phoned_Word, ERROR, fb(), Isbreak, isvowel, Look_Ahead_Letter, Look_Back_Letter, MAKESOFT, Next_Letter, NOGHTOF, palloc(), Phone_Len, Phonize, Prev_Letter, SH, TH, and word().
Referenced by metaphone().
Definition at line 731 of file fuzzystrmatch.c.
References ascii_isalpha(), Assert, fb(), pg_ascii_toupper(), soundex_code(), and SOUNDEX_LEN.
Referenced by difference(), and soundex().
Definition at line 134 of file fuzzystrmatch.c.
Referenced by _metaphone(), and _soundex().
| Datum difference | ( | PG_FUNCTION_ARGS | ) |
Definition at line 783 of file fuzzystrmatch.c.
References _soundex(), fb(), i, PG_GETARG_TEXT_PP, PG_RETURN_INT32, SOUNDEX_LEN, and text_to_cstring().
Referenced by checkcondition_str(), ExtendMultiXactMember(), find_wordentry(), getKeyJsonValueFromContainer(), hstore_concat(), hstore_delete_array(), hstore_delete_hstore(), hstore_subscript_assign(), and hstoreFindKey().
Definition at line 123 of file fuzzystrmatch.c.
References _codes, and pg_ascii_toupper().
| Datum levenshtein | ( | PG_FUNCTION_ARGS | ) |
Definition at line 182 of file fuzzystrmatch.c.
References fb(), PG_GETARG_TEXT_PP, PG_RETURN_INT32, VARDATA_ANY(), VARSIZE_ANY_EXHDR(), and varstr_levenshtein().
| Datum levenshtein_less_equal | ( | PG_FUNCTION_ARGS | ) |
Definition at line 234 of file fuzzystrmatch.c.
References fb(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, PG_RETURN_INT32, VARDATA_ANY(), VARSIZE_ANY_EXHDR(), and varstr_levenshtein_less_equal().
| Datum levenshtein_less_equal_with_costs | ( | PG_FUNCTION_ARGS | ) |
Definition at line 205 of file fuzzystrmatch.c.
References fb(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, PG_RETURN_INT32, VARDATA_ANY(), VARSIZE_ANY_EXHDR(), and varstr_levenshtein_less_equal().
| Datum levenshtein_with_costs | ( | PG_FUNCTION_ARGS | ) |
Definition at line 156 of file fuzzystrmatch.c.
References fb(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, PG_RETURN_INT32, VARDATA_ANY(), VARSIZE_ANY_EXHDR(), and varstr_levenshtein().
Definition at line 326 of file fuzzystrmatch.c.
| Datum metaphone | ( | PG_FUNCTION_ARGS | ) |
Definition at line 265 of file fuzzystrmatch.c.
References _metaphone(), cstring_to_text(), ereport, errcode(), errmsg(), ERROR, fb(), MAX_METAPHONE_STRLEN, PG_GETARG_DATUM, PG_GETARG_INT32, PG_RETURN_TEXT_P, and TextDatumGetCString.
| PG_FUNCTION_INFO_V1 | ( | difference | ) |
| PG_FUNCTION_INFO_V1 | ( | levenshtein | ) |
| PG_FUNCTION_INFO_V1 | ( | levenshtein_less_equal | ) |
| PG_FUNCTION_INFO_V1 | ( | levenshtein_less_equal_with_costs | ) |
| PG_FUNCTION_INFO_V1 | ( | levenshtein_with_costs | ) |
| PG_FUNCTION_INFO_V1 | ( | metaphone | ) |
| PG_FUNCTION_INFO_V1 | ( | soundex | ) |
| PG_MODULE_MAGIC_EXT | ( | . | name = "fuzzystrmatch", |
| . | version = PG_VERSION |
||
| ) |
| Datum soundex | ( | PG_FUNCTION_ARGS | ) |
Definition at line 718 of file fuzzystrmatch.c.
References _soundex(), arg, cstring_to_text(), fb(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, SOUNDEX_LEN, and text_to_cstring().
Referenced by daitch_mokotoff(), daitch_mokotoff_coding(), find_or_create_child_node(), update_leaves(), and update_node().
Definition at line 63 of file fuzzystrmatch.c.
References fb(), pg_ascii_toupper(), and soundex_table.
Referenced by _soundex().
Definition at line 117 of file fuzzystrmatch.c.
Referenced by getcode().
Definition at line 60 of file fuzzystrmatch.c.
Referenced by soundex_code().