forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit66f8687
committed
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 beenoverlooked (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 \rwhen stripping the trailing newline from a backtick result string.That's true enough, but we'd also fail to convert embedded \r\ncleanly, which also seems undesirable. Fixing the popen() modeseems like the best way to deal with this.It's been like this for a long time, so back-patch to all supportedbranches.Discussion:https://postgr.es/m/16688-c649c7b69cd7e6f8@postgresql.org1 parentad77039 commit66f8687
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
777 | 777 |
| |
778 | 778 |
| |
779 | 779 |
| |
780 |
| - | |
| 780 | + | |
781 | 781 |
| |
782 | 782 |
| |
783 | 783 |
| |
| |||
818 | 818 |
| |
819 | 819 |
| |
820 | 820 |
| |
821 |
| - | |
| 821 | + | |
822 | 822 |
| |
823 | 823 |
| |
824 | 824 |
| |
|
0 commit comments
Comments
(0)