aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/psqlscanslash.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/psqlscanslash.l b/src/bin/psql/psqlscanslash.l
index c2e3bfe9d0c..613f66d3bf8 100644
--- a/src/bin/psql/psqlscanslash.l
+++ b/src/bin/psql/psqlscanslash.l
@@ -777,7 +777,7 @@ evaluate_backtick(PsqlScanState state)
initPQExpBuffer(&cmd_output);
- fd = popen(cmd, PG_BINARY_R);
+ fd = popen(cmd, "r");
if (!fd)
{
pg_log_error("%s: %m", cmd);
@@ -818,7 +818,7 @@ evaluate_backtick(PsqlScanState state)
/* If no error, transfer result to output_buf */
if (!error)
{
- /* strip any trailing newline */
+ /* strip any trailing newline (but only one) */
if (cmd_output.len > 0 &&
cmd_output.data[cmd_output.len - 1] == '\n')
cmd_output.len--;