aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/psqlscan.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/psqlscan.l b/src/bin/psql/psqlscan.l
index a8f2bbe094a..03b785cd84d 100644
--- a/src/bin/psql/psqlscan.l
+++ b/src/bin/psql/psqlscan.l
@@ -1717,7 +1717,7 @@ evaluate_backtick(void)
initPQExpBuffer(&cmd_output);
- fd = popen(cmd, PG_BINARY_R);
+ fd = popen(cmd, "r");
if (!fd)
{
psql_error("%s: %s\n", cmd, strerror(errno));
@@ -1758,7 +1758,7 @@ evaluate_backtick(void)
/* 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--;