diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index cb4acb1..42dfb5f 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -228,7 +228,7 @@ tsvector_setweight(PG_FUNCTION_ARGS)
 			break;
 		default:
 			/* internal error */
-			elog(ERROR, "unrecognized weight: %d", cw);
+			elog(ERROR, "unrecognized weight: %c", cw);
 	}
 
 	out = (TSVector) palloc(VARSIZE(in));
