19 #include "utils/fmgrprotos.h"
60 lastchar =
start = in;
69 if (in - lastchar == 1 &&
t_iseq(lastchar,
'*') && flags)
87 return strcmp(((
const Syn *)
a)->in, ((
const Syn *)
b)->in);
98 bool case_sensitive =
false;
107 foreach(l, dictoptions)
111 if (strcmp(defel->
defname,
"synonyms") == 0)
113 else if (strcmp(defel->
defname,
"casesensitive") == 0)
117 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
118 errmsg(
"unrecognized synonym parameter: \"%s\"",
124 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
125 errmsg(
"missing Synonyms parameter")));
131 (
errcode(ERRCODE_CONFIG_FILE_ERROR),
132 errmsg(
"could not open synonym file \"%s\": %m",
139 starti =
findwrd(line, &end, NULL);
152 starto =
findwrd(end + 1, &end, &flags);
220 if (len <= 0 || d->
len <= 0)
static void PGresult * res
bool defGetBoolean(DefElem *def)
char * defGetString(DefElem *def)
static int compareSyn(const void *a, const void *b)
static char * findwrd(char *in, char **end, uint16 *flags)
Datum dsynonym_lexize(PG_FUNCTION_ARGS)
Datum dsynonym_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)
int pg_mblen(const char *mbstr)
char * pnstrdup(const char *in, Size len)
char * pstrdup(const char *in)
void pfree(void *pointer)
void * palloc0(Size size)
void * repalloc(void *pointer, Size size)
#define qsort(a, b, c, d)
bool tsearch_readline_begin(tsearch_readline_state *stp, const char *filename)
char * tsearch_readline(tsearch_readline_state *stp)
char * lowerstr_with_len(const char *str, int len)
int t_isspace(const char *ptr)
void tsearch_readline_end(tsearch_readline_state *stp)
char * lowerstr(const char *str)
char * get_tsearch_config_filename(const char *basename, const char *extension)