diff options
author | Peter Eisentraut | 2021-04-23 12:18:11 +0000 |
---|---|---|
committer | Peter Eisentraut | 2021-04-23 12:21:37 +0000 |
commit | 82c3cd974131d7fa1cfcd07cebfb04fffe26ee35 (patch) | |
tree | 5e165fd8be0892ede2d4591ad32b559794fce887 /src/interfaces/libpq/fe-misc.c | |
parent | 9486844f301e265a3ad11b612decaba2462c3c15 (diff) |
Factor out system call names from error messages
Instead, put them in via a format placeholder. This reduces the
number of distinct translatable messages and also reduces the chances
of typos during translation. We already did this for the system call
arguments in a number of cases, so this is just the same thing taken a
bit further.
Discussion: https://www.postgresql.org/message-id/flat/92d6f545-5102-65d8-3c87-489f71ea0a37%40enterprisedb.com
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r-- | src/interfaces/libpq/fe-misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index 082b583c152..b347d7f8479 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -1080,7 +1080,8 @@ pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time) char sebuf[PG_STRERROR_R_BUFLEN]; appendPQExpBuffer(&conn->errorMessage, - libpq_gettext("select() failed: %s\n"), + libpq_gettext("%s() failed: %s\n"), + "select", SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); } |