diff --git a/src/backend/tsearch/dict_synonym.c b/src/backend/tsearch/dict_synonym.c index fe7ca30ce97..b1a3d955f55 100644 --- a/src/backend/tsearch/dict_synonym.c +++ b/src/backend/tsearch/dict_synonym.c @@ -22,7 +22,6 @@ typedef struct { char *in; char *out; - int outlen; uint16 flags; } Syn; @@ -187,7 +186,6 @@ dsynonym_init(PG_FUNCTION_ARGS) d->syn[cur].out = lowerstr(starto); } - d->syn[cur].outlen = strlen(starto); d->syn[cur].flags = flags; cur++; @@ -234,7 +232,7 @@ dsynonym_lexize(PG_FUNCTION_ARGS) PG_RETURN_POINTER(NULL); res = palloc0(sizeof(TSLexeme) * 2); - res[0].lexeme = pnstrdup(found->out, found->outlen); + res[0].lexeme = pstrdup(found->out); res[0].flags = found->flags; PG_RETURN_POINTER(res);