Skip to content

Commit ced12b7

Browse files
committed
libpq: Refactor some error messages for easier translation
1 parent 853c8c7 commit ced12b7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3751,8 +3751,9 @@ PQconnectPoll(PGconn *conn)
37513751
PQclear(res);
37523752

37533753
/* Append error report to conn->errorMessage. */
3754-
appendPQExpBufferStr(&conn->errorMessage,
3755-
libpq_gettext("\"SHOW transaction_read_only\" failed\n"));
3754+
appendPQExpBuffer(&conn->errorMessage,
3755+
libpq_gettext("\"%s\" failed\n"),
3756+
"SHOW transaction_read_only");
37563757

37573758
/* Close connection politely. */
37583759
conn->status = CONNECTION_OK;
@@ -3802,8 +3803,9 @@ PQconnectPoll(PGconn *conn)
38023803
PQclear(res);
38033804

38043805
/* Append error report to conn->errorMessage. */
3805-
appendPQExpBufferStr(&conn->errorMessage,
3806-
libpq_gettext("\"SELECT pg_is_in_recovery()\" failed\n"));
3806+
appendPQExpBuffer(&conn->errorMessage,
3807+
libpq_gettext("\"%s\" failed\n"),
3808+
"SELECT pg_is_in_recovery()");
38073809

38083810
/* Close connection politely. */
38093811
conn->status = CONNECTION_OK;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy