PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/pg_ts_dict.h"
#include "commands/defrem.h"
#include "lib/stringinfo.h"
#include "tsearch/ts_cache.h"
#include "tsearch/ts_locale.h"
#include "tsearch/ts_public.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | TrieChar |
Typedefs | |
typedef struct TrieChar | TrieChar |
Functions | |
static TrieChar * | placeChar (TrieChar *node, const unsigned char *str, int lenstr, const char *replaceTo, int replacelen) |
static TrieChar * | initTrie (const char *filename) |
static TrieChar * | findReplaceTo (TrieChar *node, const unsigned char *src, int srclen, int *p_matchlen) |
PG_FUNCTION_INFO_V1 (unaccent_init) | |
Datum | unaccent_init (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (unaccent_lexize) | |
Datum | unaccent_lexize (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (unaccent_dict) | |
Datum | unaccent_dict (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
|
static |
Definition at line 308 of file unaccent.c.
References TrieChar::nextChar, and TrieChar::replaceTo.
Referenced by unaccent_lexize().
|
static |
Definition at line 94 of file unaccent.c.
References CopyErrorData(), CurrentMemoryContext, ereport, errcode(), errmsg(), ERROR, filename, FlushErrorState(), get_tsearch_config_filename(), i, MemoryContextSwitchTo(), palloc(), pfree(), PG_CATCH, PG_END_TRY, pg_mblen(), PG_RE_THROW, PG_TRY, placeChar(), skip, ErrorData::sqlerrcode, t_isspace(), tsearch_readline(), tsearch_readline_begin(), tsearch_readline_end(), and WARNING.
Referenced by unaccent_init().
PG_FUNCTION_INFO_V1 | ( | unaccent_dict | ) |
PG_FUNCTION_INFO_V1 | ( | unaccent_init | ) |
PG_FUNCTION_INFO_V1 | ( | unaccent_lexize | ) |
|
static |
Definition at line 54 of file unaccent.c.
References Assert, ereport, errcode(), errmsg(), TrieChar::nextChar, palloc(), palloc0(), TrieChar::replacelen, TrieChar::replaceTo, str, and WARNING.
Referenced by initTrie().
Datum unaccent_dict | ( | PG_FUNCTION_ARGS | ) |
Definition at line 436 of file unaccent.c.
References cstring_to_text(), DatumGetPointer(), TSDictionaryCacheEntry::dictData, ereport, errcode(), errmsg(), ERROR, FunctionCall4, get_func_namespace(), get_namespace_name(), GetSysCacheOid2, Int32GetDatum(), TSDictionaryCacheEntry::lexize, lookup_ts_dictionary_cache(), ObjectIdGetDatum(), OidIsValid, pfree(), PG_FREE_IF_COPY, PG_GETARG_OID, PG_GETARG_TEXT_P_COPY, PG_GETARG_TEXT_PP, PG_NARGS, PG_RETURN_TEXT_P, PointerGetDatum(), res, str, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum unaccent_init | ( | PG_FUNCTION_ARGS | ) |
Definition at line 335 of file unaccent.c.
References defGetString(), DefElem::defname, ereport, errcode(), errmsg(), ERROR, initTrie(), lfirst, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum unaccent_lexize | ( | PG_FUNCTION_ARGS | ) |
Definition at line 376 of file unaccent.c.
References appendBinaryStringInfo(), buf, findReplaceTo(), initStringInfo(), len, palloc0(), PG_GETARG_INT32, PG_GETARG_POINTER, pg_mblen(), PG_RETURN_POINTER, TrieChar::replacelen, TrieChar::replaceTo, res, and TSL_FILTER.
PG_MODULE_MAGIC |
Definition at line 26 of file unaccent.c.