aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/stringinfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ec5fc2422d8..eb9d6502fc8 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 bytes)", 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 bytes)\n\nCannot enlarge string buffer containing %d bytes by %d more bytes.\n"),
+ MaxAllocSize, str->len, needed);
exit(EXIT_FAILURE);
#endif
}