34 const char *extension)
48 if (strspn(basename,
"abcdefghijklmnopqrstuvwxyz0123456789_") != strlen(basename))
50 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
51 errmsg(
"invalid text search configuration file name \"%s\"",
57 sharepath, basename, extension);
82 (
errcode(ERRCODE_CONFIG_FILE_ERROR),
83 errmsg(
"could not open stop-word file \"%s\": %m",
102 if (s->
len >= reallen)
107 stop = (
char **)
palloc(
sizeof(
char *) * reallen);
112 stop = (
char **)
repalloc(stop,
sizeof(
char *) * reallen);
118 stop[s->
len] = wordop(line);
119 if (stop[s->
len] != line)
142 return (s->
stop && s->
len > 0 &&
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
char my_exec_path[MAXPGPATH]
int pg_mblen(const char *mbstr)
void pfree(void *pointer)
void * repalloc(void *pointer, Size size)
void get_share_path(const char *my_exec_path, char *ret_path)
int pg_qsort_strcmp(const void *a, const void *b)
#define qsort(a, b, c, d)
bool tsearch_readline_begin(tsearch_readline_state *stp, const char *filename)
char * tsearch_readline(tsearch_readline_state *stp)
int t_isspace(const char *ptr)
void tsearch_readline_end(tsearch_readline_state *stp)
void readstoplist(const char *fname, StopList *s, char *(*wordop)(const char *))
char * get_tsearch_config_filename(const char *basename, const char *extension)
bool searchstoplist(StopList *s, char *key)