Commit d7b5762
authored
Add an option in psql to avoid encoding issues on some platforms (#535)
When running ICW tests, the following command has a strange behavior.
shell
psql ... <<EOF
$(cat prehook inputfile)
EOF
The command has an issue on some platforms that will input
unexpected data stream to psql. For example, The following first
line will become to the second line:
"колонка 6" int, "колонка 7" int, "колонка 8" int, "колонка 9" int, "колонка 10" int, "колонка 11" int,
"колонка 6" int, "колонка 7" int, "колонка 8" int, "колонка 9" int, "колонЀ�а 10" int, "колонка 11" int,
It's unknown why the input stream is changed. The other similar
commands will have correct data stream to psql, like
cat prehook inputfile | psql ...
or for a single input file
psql ... < inputfile
In this commit, we convert the original command to
shell
psql ... -f prehook -f inputfile --ignore-log-file
The new option --ignore-log-file will ignore the logging prefix
for psql and filename, so the program psql will log like no input
filename is provided.1 parent ed64982 commit d7b5762
File tree
5 files changed
+22
-5
lines changed- src
- bin/psql
- test/regress
5 files changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4051 | 4051 | | |
4052 | 4052 | | |
4053 | 4053 | | |
4054 | | - | |
| 4054 | + | |
4055 | 4055 | | |
4056 | 4056 | | |
4057 | 4057 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
| 503 | + | |
501 | 504 | | |
502 | 505 | | |
503 | 506 | | |
| |||
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
697 | 703 | | |
698 | 704 | | |
699 | 705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
132 | 143 | | |
133 | 144 | | |
134 | | - | |
135 | | - | |
136 | | - | |
| 145 | + | |
| 146 | + | |
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
| |||
0 commit comments