adjust_enlargeStringInfo_error_msg.patch
application/octet-stream
Filename: adjust_enlargeStringInfo_error_msg.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/common/stringinfo.c | 3 | 3 |
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ec5fc2422d..abce5c0685 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -311,13 +311,13 @@ enlargeStringInfo(StringInfo str, int needed)
#ifndef FRONTEND
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("out of memory"),
+ errmsg("string buffer exceeds maximum allowed length (%zu)", MaxAllocSize),
errdetail("Cannot enlarge string buffer containing %d bytes by %d more bytes.",
str->len, needed)));
#else
fprintf(stderr,
- _("out of memory\n\nCannot enlarge string buffer containing %d bytes by %d more bytes.\n"),
- str->len, needed);
+ _("string buffer exceeds maximum allowed length (%zu)\n\nCannot enlarge string buffer containing %d bytes by %d more bytes.\n"),
+ MaxAllocSize, str->len, needed);
exit(EXIT_FAILURE);
#endif
}