1/*-------------------------------------------------------------------------
4 * Simple dictionary: just lowercase and check for stopword
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
10 * src/backend/tsearch/dict_simple.c
12 *-------------------------------------------------------------------------
16#include "catalog/pg_collation_d.h"
19#include "utils/fmgrprotos.h"
35 bool stoploaded =
false,
39 d->
accept =
true;
/* default */
41 foreach(l, dictoptions)
45 if (strcmp(defel->
defname,
"stopwords") == 0)
49 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
50 errmsg(
"multiple StopWords parameters")));
54 else if (strcmp(defel->
defname,
"accept") == 0)
58 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
59 errmsg(
"multiple Accept parameters")));
66 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
67 errmsg(
"unrecognized simple dictionary parameter: \"%s\"",
88 /* reject as stopword */
102 /* report as unrecognized */
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
Datum dsimple_lexize(PG_FUNCTION_ARGS)
Datum dsimple_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 readstoplist(const char *fname, StopList *s, char *(*wordop)(const char *, size_t, Oid))
bool searchstoplist(StopList *s, char *key)