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/tsvector.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/adt/tsvector.c') diff --git a/src/backend/utils/adt/tsvector.c b/src/backend/utils/adt/tsvector.c index fb44c1224f8..1d5e14feef7 100644 --- a/src/backend/utils/adt/tsvector.c +++ b/src/backend/utils/adt/tsvector.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.9 2007/11/16 15:05:59 teodor Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.10 2007/11/28 21:56:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -480,13 +480,13 @@ tsvectorrecv(PG_FUNCTION_ARGS) lex_len = strlen(lexeme); if (lex_len < 0 || lex_len > MAXSTRLEN) - elog(ERROR, "invalid tsvector; lexeme too long"); + elog(ERROR, "invalid tsvector: lexeme too long"); if (datalen > MAXSTRPOS) - elog(ERROR, "invalid tsvector; maximum total lexeme length exceeded"); + elog(ERROR, "invalid tsvector: maximum total lexeme length exceeded"); if (npos > MAXNUMPOS) - elog(ERROR, "unexpected number of positions"); + elog(ERROR, "unexpected number of tsvector positions"); /* * Looks valid. Fill the WordEntry struct, and copy lexeme. -- cgit v1.2.3