postgresql/src
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
..
backend Fix use-after-free bug with event triggers and ALTER TABLE. 2020-10-27 15:37:13 -04:00
bin Use mode "r" for popen() in psql's evaluate_backtick(). 2020-10-28 14:35:53 -04:00
common Replace use of sys_siglist[] with strsignal(). 2020-07-15 22:05:12 -04:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include llvmjit: Work around bug in LLVM 3.9 causing crashes after 72559438f9. 2020-10-15 18:17:01 -07:00
interfaces Fix ancient bug in ecpg's pthread_once() emulation for Windows. 2020-10-24 13:12:31 -04:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
pl Fix incorrect assertion on number of array dimensions. 2020-10-01 11:50:41 +03:00
port In the postmaster, rely on the signal infrastructure to block signals. 2020-10-15 12:50:57 -04:00
template Makefile comment: remove reference to tools/thread/thread_test 2020-10-27 14:00:46 -04:00
test Accept relations of any kind in LOCK TABLE 2020-10-27 13:49:19 -03:00
timezone Update time zone data files to tzdata release 2020d. 2020-10-22 21:24:12 -04:00
tools Sync our copy of the timezone library with IANA release tzcode2020c. 2020-10-16 21:40:16 -04:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00