summaryrefslogtreecommitdiff
path: root/src/backend/tsearch
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2008-03-05 15:50:37 +0000
committerBruce Momjian <bruce@momjian.us>2008-03-05 15:50:37 +0000
commit910bc51862ad1f0cf9726ab04f4ca71cb557f65b (patch)
tree232098735a2796c3fa1b1a73db00ddc90f90c927 /src/backend/tsearch
parent0e50b080fa9ad8a86f43ed01bacc2e4ce48601b9 (diff)
downloadpostgresql-910bc51862ad1f0cf9726ab04f4ca71cb557f65b.tar.gz
When text search string is too long, in error message report actual and
maximum number of bytes allowed.
Diffstat (limited to 'src/backend/tsearch')
-rw-r--r--src/backend/tsearch/to_tsany.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c
index 5c954fa431..17b86ec03e 100644
--- a/src/backend/tsearch/to_tsany.c
+++ b/src/backend/tsearch/to_tsany.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tsearch/to_tsany.c,v 1.8 2008/01/01 19:45:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tsearch/to_tsany.c,v 1.9 2008/03/05 15:50:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -163,7 +163,7 @@ make_tsvector(ParsedText *prs)
if (lenstr > MAXSTRPOS)
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("string is too long for tsvector")));
+ errmsg("string is too long for tsvector (%d bytes, max %d bytes)", lenstr, MAXSTRPOS)));
totallen = CALCDATASIZE(prs->curwords, lenstr);
in = (TSVector) palloc0(totallen);