Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9d966c2

Browse files
committed
Fix unportable coding of new error message, per Kris Jurka.
1 parent 52a8d4f commit 9d966c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/utils/adt/tsvector.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.12 2008/03/05 15:50:37 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.13 2008/03/10 12:57:05 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -224,7 +224,8 @@ tsvectorin(PG_FUNCTION_ARGS)
224224
if (cur - tmpbuf > MAXSTRPOS)
225225
ereport(ERROR,
226226
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
227-
errmsg("string is too long for tsvector (%d bytes, max %d bytes)", cur - tmpbuf, MAXSTRPOS)));
227+
errmsg("string is too long for tsvector (%ld bytes, max %ld bytes)",
228+
(long) (cur - tmpbuf), (long) MAXSTRPOS)));
228229

229230
/*
230231
* Enlarge buffers if needed

0 commit comments

Comments
 (0)