From bb0e3011f8670cefc7b4ef667d890c9adb7556db Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 28 Nov 2007 21:56:30 +0000 Subject: Make a cleanup pass over error reports in tsearch code. Use ereport for user-facing errors, fix some poor choices of errcode, adhere to message style guide. --- src/backend/utils/adt/tsquery_cleanup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/tsquery_cleanup.c') diff --git a/src/backend/utils/adt/tsquery_cleanup.c b/src/backend/utils/adt/tsquery_cleanup.c index c395a1f2c2a..c58cce8f5e7 100644 --- a/src/backend/utils/adt/tsquery_cleanup.c +++ b/src/backend/utils/adt/tsquery_cleanup.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_cleanup.c,v 1.7 2007/11/15 22:25:16 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_cleanup.c,v 1.8 2007/11/28 21:56:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -281,7 +281,8 @@ clean_fakeval(QueryItem *ptr, int *len) resroot = clean_fakeval_intree(root, &result); if (result != V_UNKNOWN) { - elog(NOTICE, "query contains only stopword(s) or doesn't contain lexeme(s), ignored"); + ereport(NOTICE, + (errmsg("query contains only stopword(s) or doesn't contain lexeme(s), ignored"))); *len = 0; return NULL; } -- cgit v1.2.3