Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3991c3f

Browse files
committed
In tsearch code, remove !(A && B) via restructuring, for clarity
1 parentc293ba9 commit3991c3f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

‎src/backend/tsearch/dict_thesaurus.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/dict_thesaurus.c,v 1.4 2007/09/18 15:03:23 teodor Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/dict_thesaurus.c,v 1.5 2007/11/09 01:32:22 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -418,14 +418,13 @@ compileTheLexeme(DictThesaurus * d)
418418
Int32GetDatum(strlen(d->wrds[i].lexeme)),
419419
PointerGetDatum(NULL)));
420420

421-
if (!(ptr&&ptr->lexeme))
421+
if (!ptr)
422+
elog(ERROR,"thesaurus word-sample \"%s\" isn't recognized by subdictionary (rule %d)",
423+
d->wrds[i].lexeme,d->wrds[i].entries->idsubst+1);
424+
elseif (!(ptr->lexeme))
422425
{
423-
if (!ptr)
424-
elog(ERROR,"thesaurus word-sample \"%s\" isn't recognized by subdictionary (rule %d)",
425-
d->wrds[i].lexeme,d->wrds[i].entries->idsubst+1);
426-
else
427-
elog(NOTICE,"thesaurus word-sample \"%s\" is recognized as stop-word, assign any stop-word (rule %d)",
428-
d->wrds[i].lexeme,d->wrds[i].entries->idsubst+1);
426+
elog(NOTICE,"thesaurus word-sample \"%s\" is recognized as stop-word, assign any stop-word (rule %d)",
427+
d->wrds[i].lexeme,d->wrds[i].entries->idsubst+1);
429428

430429
newwrds=addCompiledLexeme(newwrds,&nnw,&tnm,NULL,d->wrds[i].entries,0);
431430
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp