aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-11-09 01:32:22 +0000
committerBruce Momjian <bruce@momjian.us>2007-11-09 01:32:22 +0000
commit3991c3fb2beb7164fc3a1461928e06d52e680dfd (patch)
treec94ce5170deeb1b508d066b8cd4fe15d233ca5a4
parentc293ba9effba68f17fec74d3ca0e8f900f3c8a53 (diff)
downloadpostgresql-3991c3fb2beb7164fc3a1461928e06d52e680dfd.tar.gz
postgresql-3991c3fb2beb7164fc3a1461928e06d52e680dfd.zip
In tsearch code, remove !(A && B) via restructuring, for clarity
-rw-r--r--src/backend/tsearch/dict_thesaurus.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/tsearch/dict_thesaurus.c b/src/backend/tsearch/dict_thesaurus.c
index 5532947be8e..7a0ae4afd3e 100644
--- a/src/backend/tsearch/dict_thesaurus.c
+++ b/src/backend/tsearch/dict_thesaurus.c
@@ -7,7 +7,7 @@
*
*
* 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,14 +418,13 @@ compileTheLexeme(DictThesaurus * d)
Int32GetDatum(strlen(d->wrds[i].lexeme)),
PointerGetDatum(NULL)));
- if (!(ptr && ptr->lexeme))
+ if (!ptr)
+ elog(ERROR, "thesaurus word-sample \"%s\" isn't recognized by subdictionary (rule %d)",
+ d->wrds[i].lexeme, d->wrds[i].entries->idsubst + 1);
+ else if (!(ptr->lexeme))
{
- if (!ptr)
- elog(ERROR, "thesaurus word-sample \"%s\" isn't recognized by subdictionary (rule %d)",
- d->wrds[i].lexeme, d->wrds[i].entries->idsubst + 1);
- else
- 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);
+ 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);
newwrds = addCompiledLexeme(newwrds, &nnw, &tnm, NULL, d->wrds[i].entries, 0);
}