postgres.git / summary / log / commit / refs

commit    87af12e71fa9408e629f7a9772dc817de3ba44b8
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Thu May 01 21:36:47 2025 +0000
First released in: 13.21, 14.18, 15.13

    Add missing newlines to PQescapeInternal() messages pre-v16.
    
    While back-patching 9f45e6a91, I neglected that the convention in
    pre-v16 libpq was to include a trailing newline in error message
    strings (since then, we add those separately).  Add them now.
    
    Reported-by: Peter Eisentraut <peter@eisentraut.org>
    Discussion: https://postgr.es/m/a9c837ad-d507-4607-94e4-c5743a8f49e0@eisentraut.org
    Backpatch-through: 13-15


src/interfaces/libpq/fe-exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 4a4731d048c..73c3a0f9025 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -4040,10 +4040,10 @@ PQescapeStringInternal(PGconn *conn, { if (remaining < charlen) appendPQExpBufferStr(&conn->errorMessage, - libpq_gettext("incomplete multibyte character")); + libpq_gettext("incomplete multibyte character\n")); else appendPQExpBufferStr(&conn->errorMessage, - libpq_gettext("invalid multibyte character")); + libpq_gettext("invalid multibyte character\n")); /* Issue a complaint only once per string */ already_complained = true; } [parent: 8b65f7106edb]