aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-misc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-09-26 12:35:57 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-09-26 12:35:57 -0400
commit758ce9b7794845f95473c569155d29fcf0e2751b (patch)
tree9110f776f5f665b4cfff55223c7e0f2da47ffaaf /src/interfaces/libpq/fe-misc.c
parent26e9d4d4ef16b5e2be96319f89ea6ba7f63a4d73 (diff)
downloadpostgresql-758ce9b7794845f95473c569155d29fcf0e2751b.tar.gz
postgresql-758ce9b7794845f95473c569155d29fcf0e2751b.zip
Incorporate strerror_r() into src/port/snprintf.c, too.
This provides the features that used to exist in useful_strerror() for users of strerror_r(), too. Also, standardize on the GNU convention that strerror_r returns a char pointer that may not be NULL. I notice that libpq's win32.c contains a variant version of strerror_r that probably ought to be folded into strerror.c. But lacking a Windows environment, I should leave that to somebody else. Discussion: https://postgr.es/m/2975.1526862605@sss.pgh.pa.us
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r--src/interfaces/libpq/fe-misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 2a6637fdda3..46ece1a14c8 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -1071,7 +1071,7 @@ pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time)
if (result < 0)
{
- char sebuf[256];
+ char sebuf[PG_STRERROR_R_BUFLEN];
printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("select() failed: %s\n"),