forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit10c5291
committed
Fix handling of redundant options with COPY for "freeze" and "header"
The handling of those options was inconsistent, as the processing useddirectly the value assigned to the option to check if it was redundant,leading to patterns like this one to succeed (note that false isspecified first):COPY hoge to '/path/to/file/' (header off, header on);And the opposite would fail correctly (note that true is first here):COPY hoge to '/path/to/file/' (header on, header off);While on it, add some tests to check for all redundant patterns with theoptions of COPY. I have gone through the code and did not noticesimilar mistakes for other commands."header" got it wrong sinceb63990c, and "freeze" was wrong from thestart as of8de72b6. No backpatch is done per the lack of complaints.Reported-by: Rémi LapeyreDiscussion:https://postgr.es/m/20200929072433.GA15570@paquier.xyzDiscussion:https://postgr.es/m/0B55BD07-83E4-439F-AACC-FA2D7CF50532@lenstra.fr1 parent97b6144 commit10c5291
3 files changed
+67
-2
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1159 | 1159 |
| |
1160 | 1160 |
| |
1161 | 1161 |
| |
| 1162 | + | |
| 1163 | + | |
1162 | 1164 |
| |
1163 | 1165 |
| |
1164 | 1166 |
| |
| |||
1198 | 1200 |
| |
1199 | 1201 |
| |
1200 | 1202 |
| |
1201 |
| - | |
| 1203 | + | |
1202 | 1204 |
| |
1203 | 1205 |
| |
1204 | 1206 |
| |
1205 | 1207 |
| |
| 1208 | + | |
1206 | 1209 |
| |
1207 | 1210 |
| |
1208 | 1211 |
| |
| |||
1225 | 1228 |
| |
1226 | 1229 |
| |
1227 | 1230 |
| |
1228 |
| - | |
| 1231 | + | |
1229 | 1232 |
| |
1230 | 1233 |
| |
1231 | 1234 |
| |
1232 | 1235 |
| |
| 1236 | + | |
1233 | 1237 |
| |
1234 | 1238 |
| |
1235 | 1239 |
| |
|
Lines changed: 47 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
31 | 78 |
| |
32 | 79 |
| |
33 | 80 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
56 | 70 |
| |
57 | 71 |
| |
58 | 72 |
| |
|
0 commit comments
Comments
(0)