*** a/src/backend/tsearch/spell.c --- b/src/backend/tsearch/spell.c *************** *** 429,443 **** NIAddAffix(IspellDict *Conf, int flag, char flagflags, const char *mask, const c err = pg_regcomp(&(Affix->reg.regex), wmask, wmasklen, REG_ADVANCED | REG_NOSUB, DEFAULT_COLLATION_OID); if (err) ! { ! char errstr[100]; ! ! pg_regerror(err, &(Affix->reg.regex), errstr, sizeof(errstr)); ! ereport(ERROR, ! (errcode(ERRCODE_INVALID_REGULAR_EXPRESSION), ! errmsg("invalid regular expression: %s", errstr))); ! } } Affix->flagflags = flagflags; --- 429,437 ---- err = pg_regcomp(&(Affix->reg.regex), wmask, wmasklen, REG_ADVANCED | REG_NOSUB, DEFAULT_COLLATION_OID); + /* Ignore regular expression error and do not add wrong affix */ if (err) ! return; } Affix->flagflags = flagflags;