aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2024-03-08 22:50:20 +0100
committerDaniel Gustafsson <dgustafsson@postgresql.org>2024-03-08 22:50:20 +0100
commit6929e133b309d5d4568b5ed25b136935f63be618 (patch)
tree899f64c79eb63d5674968ef77933b715fe464b10
parentf07a20c8a3b15e71d3cbfcfed0600956042cbe74 (diff)
downloadpostgresql-6929e133b309d5d4568b5ed25b136935f63be618.tar.gz
postgresql-6929e133b309d5d4568b5ed25b136935f63be618.zip
Replace perror with custom postgres logging
perror() is not used in postgres anymore out of policy, this replaces the final callsites with the custom postgres logging framework. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/89B00F63-40F7-4D82-8353-DC9CABBAC1D1@yesql.se
-rw-r--r--src/common/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/exec.c b/src/common/exec.c
index da929f15b95..bcd5b71101e 100644
--- a/src/common/exec.c
+++ b/src/common/exec.c
@@ -378,7 +378,8 @@ pipe_read_line(char *cmd)
errno = 0;
if ((pipe_cmd = popen(cmd, "r")) == NULL)
{
- perror("popen failure");
+ log_error(errcode(ERRCODE_SYSTEM_ERROR),
+ _("could not execute command \"%s\": %m"), cmd);
return NULL;
}