In tsearch code, remove !(A && B) via restructuring, for clarity
This commit is contained in:
parent
c293ba9eff
commit
3991c3fb2b
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/tsearch/dict_thesaurus.c,v 1.4 2007/09/18 15:03:23 teodor Exp $
|
* $PostgreSQL: pgsql/src/backend/tsearch/dict_thesaurus.c,v 1.5 2007/11/09 01:32:22 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -418,12 +418,11 @@ compileTheLexeme(DictThesaurus * d)
|
||||||
Int32GetDatum(strlen(d->wrds[i].lexeme)),
|
Int32GetDatum(strlen(d->wrds[i].lexeme)),
|
||||||
PointerGetDatum(NULL)));
|
PointerGetDatum(NULL)));
|
||||||
|
|
||||||
if (!(ptr && ptr->lexeme))
|
|
||||||
{
|
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
elog(ERROR, "thesaurus word-sample \"%s\" isn't recognized by subdictionary (rule %d)",
|
elog(ERROR, "thesaurus word-sample \"%s\" isn't recognized by subdictionary (rule %d)",
|
||||||
d->wrds[i].lexeme, d->wrds[i].entries->idsubst + 1);
|
d->wrds[i].lexeme, d->wrds[i].entries->idsubst + 1);
|
||||||
else
|
else if (!(ptr->lexeme))
|
||||||
|
{
|
||||||
elog(NOTICE, "thesaurus word-sample \"%s\" is recognized as stop-word, assign any stop-word (rule %d)",
|
elog(NOTICE, "thesaurus word-sample \"%s\" is recognized as stop-word, assign any stop-word (rule %d)",
|
||||||
d->wrds[i].lexeme, d->wrds[i].entries->idsubst + 1);
|
d->wrds[i].lexeme, d->wrds[i].entries->idsubst + 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue