1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Tom Lane
2007-11-28 21:56:30 +00:00
parent 664782ee74
commit bb0e3011f8
9 changed files with 71 additions and 47 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_parser.c,v 1.4 2007/11/15 22:25:16 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_parser.c,v 1.5 2007/11/28 21:56:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -359,7 +359,8 @@ gettoken_tsvector(TSVectorParseState state,
PRSSYNTAXERROR;
}
else /* internal error */
elog(ERROR, "internal error in gettoken_tsvector");
elog(ERROR, "unrecognized state in gettoken_tsvector: %d",
statecode);
/* get next char */
state->prsbuf += pg_mblen(state->prsbuf);