Fix unportable coding of new error message, per Kris Jurka.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Mar 2008 12:57:05 +0000 (12:57 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Mar 2008 12:57:05 +0000 (12:57 +0000)
src/backend/utils/adt/tsvector.c

index bd26f40297d5dc6c09831633d87782d491bc13a8..c4d9cb6c4c0e375cca0d45c3f03a0329f1a19010 100644 (file)
@@ -224,7 +224,8 @@ tsvectorin(PG_FUNCTION_ARGS)
                if (cur - tmpbuf > MAXSTRPOS)
                        ereport(ERROR,
                                        (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-                                        errmsg("string is too long for tsvector (%d bytes, max %d bytes)", cur - tmpbuf, MAXSTRPOS)));
+                                        errmsg("string is too long for tsvector (%ld bytes, max %ld bytes)",
+                                                       (long) (cur - tmpbuf), (long) MAXSTRPOS)));
 
                /*
                 * Enlarge buffers if needed