aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/user.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-10-28 14:35:53 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-10-28 14:35:53 -0400
commitaff06436caf844877f99d32346b076a480e582a7 (patch)
tree14c0a777909d8632b23b1e8bc6f986fb178b5c92 /src/backend/commands/user.c
parent7978ad025478e1c6f3a60ee95d6ebefe7f263841 (diff)
downloadpostgresql-aff06436caf844877f99d32346b076a480e582a7.tar.gz
postgresql-aff06436caf844877f99d32346b076a480e582a7.zip
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
Diffstat (limited to 'src/backend/commands/user.c')
0 files changed, 0 insertions, 0 deletions