aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsquery_cleanup.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-11-28 21:56:30 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-11-28 21:56:30 +0000
commitbb0e3011f8670cefc7b4ef667d890c9adb7556db (patch)
tree26d5f01629043b8552c669f4fd05bde13919f1ba /src/backend/utils/adt/tsquery_cleanup.c
parent664782ee74ce5c02a35f22543451f957a84f043c (diff)
downloadpostgresql-bb0e3011f8670cefc7b4ef667d890c9adb7556db.tar.gz
postgresql-bb0e3011f8670cefc7b4ef667d890c9adb7556db.zip
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.
Diffstat (limited to 'src/backend/utils/adt/tsquery_cleanup.c')
-rw-r--r--src/backend/utils/adt/tsquery_cleanup.c5
1 files changed, 3 insertions, 2 deletions
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;
}