postgresql/src/bin
Tom Lane 9eb2503391 Use mode "r" for popen() in psql's evaluate_backtick().
In almost all other places, we use plain "r" or "w" mode in popen()
calls (the exceptions being for COPY data).  This one has been
overlooked (possibly because it's buried in a ".l" flex file?),
but it's using PG_BINARY_R.

Kensuke Okamura complained in bug #16688 that we fail to strip \r
when stripping the trailing newline from a backtick result string.
That's true enough, but we'd also fail to convert embedded \r\n
cleanly, which also seems undesirable.  Fixing the popen() mode
seems like the best way to deal with this.

It's been like this for a long time, so back-patch to all supported
branches.

Discussion: https://postgr.es/m/16688-c649c7b69cd7e6f8@postgresql.org
2020-10-28 14:35:53 -04:00
..
initdb Translation updates 2020-08-10 15:27:40 +02:00
pg_archivecleanup Translation updates 2020-08-10 15:27:40 +02:00
pg_basebackup Translation updates 2020-08-10 15:27:40 +02:00
pg_config Translation updates 2020-08-10 15:27:40 +02:00
pg_controldata Translation updates 2020-08-10 15:27:40 +02:00
pg_ctl Translation updates 2020-08-10 15:27:40 +02:00
pg_dump pg_dump: Lock all relations, not just plain tables 2020-10-27 14:31:37 -03:00
pg_resetwal Translation updates 2020-08-10 15:27:40 +02:00
pg_rewind Remove useless lstat() call in pg_rewind. 2020-09-06 11:50:41 -04:00
pg_test_fsync Translation updates 2020-08-10 15:27:40 +02:00
pg_test_timing Translation updates 2020-08-10 15:27:40 +02:00
pg_upgrade pg_upgrade: remove C99 compiler req. from commit 3c0471b5fd 2020-10-15 20:37:19 -04:00
pg_verify_checksums Translation updates 2020-08-10 15:27:40 +02:00
pg_waldump Translation updates 2020-08-10 15:27:40 +02:00
pgbench Fix integer-overflow edge case detection in interval_mul and pgbench. 2019-11-07 11:23:00 -05:00
pgevent Update copyright for 2018 2018-01-02 23:30:12 -05:00
psql Use mode "r" for popen() in psql's evaluate_backtick(). 2020-10-28 14:35:53 -04:00
scripts Fix connection string handling in src/bin/scripts/ programs. 2020-10-19 19:03:47 -04:00
Makefile Allow on-line enabling and disabling of data checksums 2018-04-05 22:04:48 +02:00