Commit 82c3cd97 authored by Peter Eisentraut's avatar Peter Eisentraut

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
parent 9486844f
...@@ -485,8 +485,9 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber, ...@@ -485,8 +485,9 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
{ {
ereport(LOG, ereport(LOG,
(errcode_for_socket_access(), (errcode_for_socket_access(),
/* translator: first %s is IPv4, IPv6, or Unix */ /* translator: third %s is IPv4, IPv6, or Unix */
errmsg("setsockopt(SO_REUSEADDR) failed for %s address \"%s\": %m", errmsg("%s(%s) failed for %s address \"%s\": %m",
"setsockopt", "SO_REUSEADDR",
familyDesc, addrDesc))); familyDesc, addrDesc)));
closesocket(fd); closesocket(fd);
continue; continue;
...@@ -502,8 +503,9 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber, ...@@ -502,8 +503,9 @@ StreamServerPort(int family, const char *hostName, unsigned short portNumber,
{ {
ereport(LOG, ereport(LOG,
(errcode_for_socket_access(), (errcode_for_socket_access(),
/* translator: first %s is IPv4, IPv6, or Unix */ /* translator: third %s is IPv4, IPv6, or Unix */
errmsg("setsockopt(IPV6_V6ONLY) failed for %s address \"%s\": %m", errmsg("%s(%s) failed for %s address \"%s\": %m",
"setsockopt", "IPV6_V6ONLY",
familyDesc, addrDesc))); familyDesc, addrDesc)));
closesocket(fd); closesocket(fd);
continue; continue;
...@@ -741,7 +743,7 @@ StreamConnection(pgsocket server_fd, Port *port) ...@@ -741,7 +743,7 @@ StreamConnection(pgsocket server_fd, Port *port)
&port->laddr.salen) < 0) &port->laddr.salen) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("getsockname() failed: %m"))); (errmsg("%s() failed: %m", "getsockname")));
return STATUS_ERROR; return STATUS_ERROR;
} }
...@@ -761,7 +763,7 @@ StreamConnection(pgsocket server_fd, Port *port) ...@@ -761,7 +763,7 @@ StreamConnection(pgsocket server_fd, Port *port)
(char *) &on, sizeof(on)) < 0) (char *) &on, sizeof(on)) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", "TCP_NODELAY"))); (errmsg("%s(%s) failed: %m", "setsockopt", "TCP_NODELAY")));
return STATUS_ERROR; return STATUS_ERROR;
} }
#endif #endif
...@@ -770,7 +772,7 @@ StreamConnection(pgsocket server_fd, Port *port) ...@@ -770,7 +772,7 @@ StreamConnection(pgsocket server_fd, Port *port)
(char *) &on, sizeof(on)) < 0) (char *) &on, sizeof(on)) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", "SO_KEEPALIVE"))); (errmsg("%s(%s) failed: %m", "setsockopt", "SO_KEEPALIVE")));
return STATUS_ERROR; return STATUS_ERROR;
} }
...@@ -802,7 +804,7 @@ StreamConnection(pgsocket server_fd, Port *port) ...@@ -802,7 +804,7 @@ StreamConnection(pgsocket server_fd, Port *port)
&optlen) < 0) &optlen) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("getsockopt(%s) failed: %m", "SO_SNDBUF"))); (errmsg("%s(%s) failed: %m", "getsockopt", "SO_SNDBUF")));
return STATUS_ERROR; return STATUS_ERROR;
} }
newopt = PQ_SEND_BUFFER_SIZE * 4; newopt = PQ_SEND_BUFFER_SIZE * 4;
...@@ -812,7 +814,7 @@ StreamConnection(pgsocket server_fd, Port *port) ...@@ -812,7 +814,7 @@ StreamConnection(pgsocket server_fd, Port *port)
sizeof(newopt)) < 0) sizeof(newopt)) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", "SO_SNDBUF"))); (errmsg("%s(%s) failed: %m", "setsockopt", "SO_SNDBUF")));
return STATUS_ERROR; return STATUS_ERROR;
} }
} }
...@@ -1594,8 +1596,8 @@ pq_setkeepaliveswin32(Port *port, int idle, int interval) ...@@ -1594,8 +1596,8 @@ pq_setkeepaliveswin32(Port *port, int idle, int interval)
!= 0) != 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("WSAIoctl(%s) failed: %d", (errmsg("%s(%s) failed: error code %d",
"SIO_KEEPALIVE_VALS", WSAGetLastError()))); "WSAIoctl", "SIO_KEEPALIVE_VALS", WSAGetLastError())));
return STATUS_ERROR; return STATUS_ERROR;
} }
if (port->keepalives_idle != idle) if (port->keepalives_idle != idle)
...@@ -1626,7 +1628,7 @@ pq_getkeepalivesidle(Port *port) ...@@ -1626,7 +1628,7 @@ pq_getkeepalivesidle(Port *port)
&size) < 0) &size) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("getsockopt(%s) failed: %m", PG_TCP_KEEPALIVE_IDLE_STR))); (errmsg("%s(%s) failed: %m", "getsockopt", PG_TCP_KEEPALIVE_IDLE_STR)));
port->default_keepalives_idle = -1; /* don't know */ port->default_keepalives_idle = -1; /* don't know */
} }
#else /* WIN32 */ #else /* WIN32 */
...@@ -1671,7 +1673,7 @@ pq_setkeepalivesidle(int idle, Port *port) ...@@ -1671,7 +1673,7 @@ pq_setkeepalivesidle(int idle, Port *port)
(char *) &idle, sizeof(idle)) < 0) (char *) &idle, sizeof(idle)) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", PG_TCP_KEEPALIVE_IDLE_STR))); (errmsg("%s(%s) failed: %m", "setsockopt", PG_TCP_KEEPALIVE_IDLE_STR)));
return STATUS_ERROR; return STATUS_ERROR;
} }
...@@ -1711,7 +1713,7 @@ pq_getkeepalivesinterval(Port *port) ...@@ -1711,7 +1713,7 @@ pq_getkeepalivesinterval(Port *port)
&size) < 0) &size) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("getsockopt(%s) failed: %m", "TCP_KEEPINTVL"))); (errmsg("%s(%s) failed: %m", "getsockopt", "TCP_KEEPINTVL")));
port->default_keepalives_interval = -1; /* don't know */ port->default_keepalives_interval = -1; /* don't know */
} }
#else #else
...@@ -1755,7 +1757,7 @@ pq_setkeepalivesinterval(int interval, Port *port) ...@@ -1755,7 +1757,7 @@ pq_setkeepalivesinterval(int interval, Port *port)
(char *) &interval, sizeof(interval)) < 0) (char *) &interval, sizeof(interval)) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", "TCP_KEEPINTVL"))); (errmsg("%s(%s) failed: %m", "setsockopt", "TCP_KEEPINTVL")));
return STATUS_ERROR; return STATUS_ERROR;
} }
...@@ -1767,7 +1769,7 @@ pq_setkeepalivesinterval(int interval, Port *port) ...@@ -1767,7 +1769,7 @@ pq_setkeepalivesinterval(int interval, Port *port)
if (interval != 0) if (interval != 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) not supported", "TCP_KEEPINTVL"))); (errmsg("%s(%s) not supported", "setsockopt", "TCP_KEEPINTVL")));
return STATUS_ERROR; return STATUS_ERROR;
} }
#endif #endif
...@@ -1794,7 +1796,7 @@ pq_getkeepalivescount(Port *port) ...@@ -1794,7 +1796,7 @@ pq_getkeepalivescount(Port *port)
&size) < 0) &size) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("getsockopt(%s) failed: %m", "TCP_KEEPCNT"))); (errmsg("%s(%s) failed: %m", "getsockopt", "TCP_KEEPCNT")));
port->default_keepalives_count = -1; /* don't know */ port->default_keepalives_count = -1; /* don't know */
} }
} }
...@@ -1833,7 +1835,7 @@ pq_setkeepalivescount(int count, Port *port) ...@@ -1833,7 +1835,7 @@ pq_setkeepalivescount(int count, Port *port)
(char *) &count, sizeof(count)) < 0) (char *) &count, sizeof(count)) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", "TCP_KEEPCNT"))); (errmsg("%s(%s) failed: %m", "setsockopt", "TCP_KEEPCNT")));
return STATUS_ERROR; return STATUS_ERROR;
} }
...@@ -1842,7 +1844,7 @@ pq_setkeepalivescount(int count, Port *port) ...@@ -1842,7 +1844,7 @@ pq_setkeepalivescount(int count, Port *port)
if (count != 0) if (count != 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) not supported", "TCP_KEEPCNT"))); (errmsg("%s(%s) not supported", "setsockopt", "TCP_KEEPCNT")));
return STATUS_ERROR; return STATUS_ERROR;
} }
#endif #endif
...@@ -1869,7 +1871,7 @@ pq_gettcpusertimeout(Port *port) ...@@ -1869,7 +1871,7 @@ pq_gettcpusertimeout(Port *port)
&size) < 0) &size) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("getsockopt(%s) failed: %m", "TCP_USER_TIMEOUT"))); (errmsg("%s(%s) failed: %m", "getsockopt", "TCP_USER_TIMEOUT")));
port->default_tcp_user_timeout = -1; /* don't know */ port->default_tcp_user_timeout = -1; /* don't know */
} }
} }
...@@ -1908,7 +1910,7 @@ pq_settcpusertimeout(int timeout, Port *port) ...@@ -1908,7 +1910,7 @@ pq_settcpusertimeout(int timeout, Port *port)
(char *) &timeout, sizeof(timeout)) < 0) (char *) &timeout, sizeof(timeout)) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", "TCP_USER_TIMEOUT"))); (errmsg("%s(%s) failed: %m", "setsockopt", "TCP_USER_TIMEOUT")));
return STATUS_ERROR; return STATUS_ERROR;
} }
...@@ -1917,7 +1919,7 @@ pq_settcpusertimeout(int timeout, Port *port) ...@@ -1917,7 +1919,7 @@ pq_settcpusertimeout(int timeout, Port *port)
if (timeout != 0) if (timeout != 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) not supported", "TCP_USER_TIMEOUT"))); (errmsg("%s(%s) not supported", "setsockopt", "TCP_USER_TIMEOUT")));
return STATUS_ERROR; return STATUS_ERROR;
} }
#endif #endif
......
...@@ -618,7 +618,7 @@ retry2: ...@@ -618,7 +618,7 @@ retry2:
(char *) &old_rcvbuf, &rcvbufsize) < 0) (char *) &old_rcvbuf, &rcvbufsize) < 0)
{ {
ereport(LOG, ereport(LOG,
(errmsg("getsockopt(%s) failed: %m", "SO_RCVBUF"))); (errmsg("%s(%s) failed: %m", "getsockopt", "SO_RCVBUF")));
/* if we can't get existing size, always try to set it */ /* if we can't get existing size, always try to set it */
old_rcvbuf = 0; old_rcvbuf = 0;
} }
...@@ -629,7 +629,7 @@ retry2: ...@@ -629,7 +629,7 @@ retry2:
if (setsockopt(pgStatSock, SOL_SOCKET, SO_RCVBUF, if (setsockopt(pgStatSock, SOL_SOCKET, SO_RCVBUF,
(char *) &new_rcvbuf, sizeof(new_rcvbuf)) < 0) (char *) &new_rcvbuf, sizeof(new_rcvbuf)) < 0)
ereport(LOG, ereport(LOG,
(errmsg("setsockopt(%s) failed: %m", "SO_RCVBUF"))); (errmsg("%s(%s) failed: %m", "setsockopt", "SO_RCVBUF")));
} }
} }
......
...@@ -1061,9 +1061,8 @@ WaitEventAdjustEpoll(WaitEventSet *set, WaitEvent *event, int action) ...@@ -1061,9 +1061,8 @@ WaitEventAdjustEpoll(WaitEventSet *set, WaitEvent *event, int action)
if (rc < 0) if (rc < 0)
ereport(ERROR, ereport(ERROR,
(errcode_for_socket_access(), (errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */ errmsg("%s() failed: %m",
errmsg("%s failed: %m", "epoll_ctl")));
"epoll_ctl()")));
} }
#endif #endif
...@@ -1231,9 +1230,8 @@ WaitEventAdjustKqueue(WaitEventSet *set, WaitEvent *event, int old_events) ...@@ -1231,9 +1230,8 @@ WaitEventAdjustKqueue(WaitEventSet *set, WaitEvent *event, int old_events)
else else
ereport(ERROR, ereport(ERROR,
(errcode_for_socket_access(), (errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */ errmsg("%s() failed: %m",
errmsg("%s failed: %m", "kevent")));
"kevent()")));
} }
else if (event->events == WL_POSTMASTER_DEATH && else if (event->events == WL_POSTMASTER_DEATH &&
PostmasterPid != getppid() && PostmasterPid != getppid() &&
...@@ -1461,9 +1459,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout, ...@@ -1461,9 +1459,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
waiting = false; waiting = false;
ereport(ERROR, ereport(ERROR,
(errcode_for_socket_access(), (errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */ errmsg("%s() failed: %m",
errmsg("%s failed: %m", "epoll_wait")));
"epoll_wait()")));
} }
return 0; return 0;
} }
...@@ -1614,9 +1611,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout, ...@@ -1614,9 +1611,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
waiting = false; waiting = false;
ereport(ERROR, ereport(ERROR,
(errcode_for_socket_access(), (errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */ errmsg("%s() failed: %m",
errmsg("%s failed: %m", "kevent")));
"kevent()")));
} }
return 0; return 0;
} }
...@@ -1731,9 +1727,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout, ...@@ -1731,9 +1727,8 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
waiting = false; waiting = false;
ereport(ERROR, ereport(ERROR,
(errcode_for_socket_access(), (errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */ errmsg("%s() failed: %m",
errmsg("%s failed: %m", "poll")));
"poll()")));
} }
return 0; return 0;
} }
......
...@@ -411,7 +411,7 @@ StreamLogicalLog(void) ...@@ -411,7 +411,7 @@ StreamLogicalLog(void)
} }
else if (r < 0) else if (r < 0)
{ {
pg_log_error("select() failed: %m"); pg_log_error("%s() failed: %m", "select");
goto error; goto error;
} }
......
...@@ -897,7 +897,7 @@ CopyStreamPoll(PGconn *conn, long timeout_ms, pgsocket stop_socket) ...@@ -897,7 +897,7 @@ CopyStreamPoll(PGconn *conn, long timeout_ms, pgsocket stop_socket)
{ {
if (errno == EINTR) if (errno == EINTR)
return 0; /* Got a signal, so not an error */ return 0; /* Got a signal, so not an error */
pg_log_error("select() failed: %m"); pg_log_error("%s() failed: %m", "select");
return -1; return -1;
} }
if (ret > 0 && FD_ISSET(connsocket, &input_mask)) if (ret > 0 && FD_ISSET(connsocket, &input_mask))
......
...@@ -251,7 +251,7 @@ init_parallel_dump_utils(void) ...@@ -251,7 +251,7 @@ init_parallel_dump_utils(void)
err = WSAStartup(MAKEWORD(2, 2), &wsaData); err = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (err != 0) if (err != 0)
{ {
pg_log_error("WSAStartup failed: %d", err); pg_log_error("%s() failed: error code %d", "WSAStartup", err);
exit_nicely(1); exit_nicely(1);
} }
...@@ -1611,7 +1611,7 @@ getMessageFromWorker(ParallelState *pstate, bool do_wait, int *worker) ...@@ -1611,7 +1611,7 @@ getMessageFromWorker(ParallelState *pstate, bool do_wait, int *worker)
} }
if (i < 0) if (i < 0)
fatal("select() failed: %m"); fatal("%s() failed: %m", "select");
for (i = 0; i < pstate->numWorkers; i++) for (i = 0; i < pstate->numWorkers; i++)
{ {
...@@ -1761,7 +1761,7 @@ pgpipe(int handles[2]) ...@@ -1761,7 +1761,7 @@ pgpipe(int handles[2])
} }
if (getsockname(s, (SOCKADDR *) &serv_addr, &len) == SOCKET_ERROR) if (getsockname(s, (SOCKADDR *) &serv_addr, &len) == SOCKET_ERROR)
{ {
pg_log_error("pgpipe: getsockname() failed: error code %d", pg_log_error("pgpipe: %s() failed: error code %d", "getsockname",
WSAGetLastError()); WSAGetLastError());
closesocket(s); closesocket(s);
return -1; return -1;
......
...@@ -297,7 +297,7 @@ reap_child(bool wait_for_child) ...@@ -297,7 +297,7 @@ reap_child(bool wait_for_child)
#ifndef WIN32 #ifndef WIN32
child = waitpid(-1, &work_status, wait_for_child ? 0 : WNOHANG); child = waitpid(-1, &work_status, wait_for_child ? 0 : WNOHANG);
if (child == (pid_t) -1) if (child == (pid_t) -1)
pg_fatal("waitpid() failed: %s\n", strerror(errno)); pg_fatal("%s() failed: %s\n", "waitpid", strerror(errno));
if (child == 0) if (child == 0)
return false; /* no children, or no dead children */ return false; /* no children, or no dead children */
if (work_status != 0) if (work_status != 0)
......
...@@ -406,7 +406,7 @@ pclose_check(FILE *stream) ...@@ -406,7 +406,7 @@ pclose_check(FILE *stream)
{ {
/* pclose() itself failed, and hopefully set errno */ /* pclose() itself failed, and hopefully set errno */
log_error(errcode(ERRCODE_SYSTEM_ERROR), log_error(errcode(ERRCODE_SYSTEM_ERROR),
_("pclose failed: %m")); _("%s() failed: %m"), "pclose");
} }
else else
{ {
......
...@@ -1863,7 +1863,8 @@ setKeepalivesIdle(PGconn *conn) ...@@ -1863,7 +1863,8 @@ setKeepalivesIdle(PGconn *conn)
char sebuf[PG_STRERROR_R_BUFLEN]; char sebuf[PG_STRERROR_R_BUFLEN];
appendPQExpBuffer(&conn->errorMessage, appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("setsockopt(%s) failed: %s\n"), libpq_gettext("%s(%s) failed: %s\n"),
"setsockopt",
PG_TCP_KEEPALIVE_IDLE_STR, PG_TCP_KEEPALIVE_IDLE_STR,
SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
return 0; return 0;
...@@ -1897,7 +1898,8 @@ setKeepalivesInterval(PGconn *conn) ...@@ -1897,7 +1898,8 @@ setKeepalivesInterval(PGconn *conn)
char sebuf[PG_STRERROR_R_BUFLEN]; char sebuf[PG_STRERROR_R_BUFLEN];
appendPQExpBuffer(&conn->errorMessage, appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("setsockopt(%s) failed: %s\n"), libpq_gettext("%s(%s) failed: %s\n"),
"setsockopt",
"TCP_KEEPINTVL", "TCP_KEEPINTVL",
SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
return 0; return 0;
...@@ -1932,7 +1934,8 @@ setKeepalivesCount(PGconn *conn) ...@@ -1932,7 +1934,8 @@ setKeepalivesCount(PGconn *conn)
char sebuf[PG_STRERROR_R_BUFLEN]; char sebuf[PG_STRERROR_R_BUFLEN];
appendPQExpBuffer(&conn->errorMessage, appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("setsockopt(%s) failed: %s\n"), libpq_gettext("%s(%s) failed: %s\n"),
"setsockopt",
"TCP_KEEPCNT", "TCP_KEEPCNT",
SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
return 0; return 0;
...@@ -2019,7 +2022,8 @@ setTCPUserTimeout(PGconn *conn) ...@@ -2019,7 +2022,8 @@ setTCPUserTimeout(PGconn *conn)
char sebuf[256]; char sebuf[256];
appendPQExpBuffer(&conn->errorMessage, appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("setsockopt(%s) failed: %s\n"), libpq_gettext("%s(%s) failed: %s\n"),
"setsockopt",
"TCP_USER_TIMEOUT", "TCP_USER_TIMEOUT",
SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
return 0; return 0;
...@@ -2632,7 +2636,8 @@ keep_going: /* We will come back to here until there is ...@@ -2632,7 +2636,8 @@ keep_going: /* We will come back to here until there is
(char *) &on, sizeof(on)) < 0) (char *) &on, sizeof(on)) < 0)
{ {
appendPQExpBuffer(&conn->errorMessage, appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("setsockopt(%s) failed: %s\n"), libpq_gettext("%s(%s) failed: %s\n"),
"setsockopt",
"SO_KEEPALIVE", "SO_KEEPALIVE",
SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
err = 1; err = 1;
......
...@@ -1080,7 +1080,8 @@ pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time) ...@@ -1080,7 +1080,8 @@ pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time)
char sebuf[PG_STRERROR_R_BUFLEN]; char sebuf[PG_STRERROR_R_BUFLEN];
appendPQExpBuffer(&conn->errorMessage, appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("select() failed: %s\n"), libpq_gettext("%s() failed: %s\n"),
"select",
SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment