diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-11-28 21:56:30 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-11-28 21:56:30 +0000 |
commit | bb0e3011f8670cefc7b4ef667d890c9adb7556db (patch) | |
tree | 26d5f01629043b8552c669f4fd05bde13919f1ba /src/backend/utils/adt/tsvector_op.c | |
parent | 664782ee74ce5c02a35f22543451f957a84f043c (diff) | |
download | postgresql-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/tsvector_op.c')
-rw-r--r-- | src/backend/utils/adt/tsvector_op.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index 87694236238..6ca1c898332 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_op.c,v 1.9 2007/11/16 01:51:22 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_op.c,v 1.10 2007/11/28 21:56:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -226,9 +226,9 @@ tsvector_setweight(PG_FUNCTION_ARGS) case 'd': w = 0; break; - /* internal error */ default: - elog(ERROR, "unrecognized weight"); + /* internal error */ + elog(ERROR, "unrecognized weight: %d", cw); } out = (TSVector) palloc(VARSIZE(in)); @@ -609,7 +609,7 @@ TS_execute(QueryItem *curitem, void *checkval, bool calcnot, return TS_execute(curitem + 1, checkval, calcnot, chkcond); default: - elog(ERROR, "unknown operator %d", curitem->operator.oper); + elog(ERROR, "unrecognized operator: %d", curitem->operator.oper); } /* not reachable, but keep compiler quiet */ |