16#include "catalog/pg_collation_d.h"
20#include "utils/fmgrprotos.h"
35 bool affloaded =
false,
44 foreach(l, dictoptions)
48 if (strcmp(defel->
defname,
"dictfile") == 0)
52 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
53 errmsg(
"multiple DictFile parameters")));
59 else if (strcmp(defel->
defname,
"afffile") == 0)
63 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
64 errmsg(
"multiple AffFile parameters")));
70 else if (strcmp(defel->
defname,
"stopwords") == 0)
74 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
75 errmsg(
"multiple StopWords parameters")));
82 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
83 errmsg(
"unrecognized Ispell parameter: \"%s\"",
88 if (affloaded && dictloaded)
96 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
97 errmsg(
"missing AffFile parameter")));
102 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
103 errmsg(
"missing DictFile parameter")));
132 for (ptr = cptr; ptr->
lexeme; ptr++)
142 memcpy(cptr, ptr,
sizeof(
TSLexeme));
char * defGetString(DefElem *def)
Datum dispell_lexize(PG_FUNCTION_ARGS)
Datum dispell_init(PG_FUNCTION_ARGS)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_POINTER(n)
#define PG_GETARG_INT32(n)
#define PG_RETURN_POINTER(x)
void pfree(void *pointer)
void * palloc0(Size size)
void NIStartBuild(IspellDict *Conf)
void NIFinishBuild(IspellDict *Conf)
void NIImportAffixes(IspellDict *Conf, const char *filename)
void NISortDictionary(IspellDict *Conf)
void NISortAffixes(IspellDict *Conf)
void NIImportDictionary(IspellDict *Conf, const char *filename)
TSLexeme * NINormalizeWord(IspellDict *Conf, const char *word)
void readstoplist(const char *fname, StopList *s, char *(*wordop)(const char *, size_t, Oid))
bool searchstoplist(StopList *s, char *key)
char * get_tsearch_config_filename(const char *basename, const char *extension)