forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitda8a4c1
committed
Reject a copy EOF marker that has data ahead of it on the same line.
We have always documented that a copy EOF marker (\.) must appearby itself on a line, and that is how psql interprets the rule.However, the backend's actual COPY FROM logic only insists thatthere not be data between the \. and the following newline.Any data ahead of the \. is parsed as a final line of input.It's hard to interpret this as anything but an ancient mistakethat we've faithfully carried forward. Continuing to allow itis not cost-free, since it could mask client-side bugs thatunnecessarily backslash-escape periods (and thereby riskaccidentally creating an EOF marker). So, let's remove thatprovision and throw error if the EOF marker isn't alone on itsline, matching what the documentation has said right along.Adjust the relevant error messages to be clearer, too.Discussion:https://postgr.es/m/ed659f37-a9dd-42a7-82b9-0da562cc4006@manitou-mail.org1 parent983a588 commitda8a4c1
File tree
3 files changed
+41
-10
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+41
-10
lines changedLines changed: 12 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1403 | 1403 |
| |
1404 | 1404 |
| |
1405 | 1405 |
| |
1406 |
| - | |
| 1406 | + | |
1407 | 1407 |
| |
1408 | 1408 |
| |
1409 | 1409 |
| |
| |||
1414 | 1414 |
| |
1415 | 1415 |
| |
1416 | 1416 |
| |
1417 |
| - | |
| 1417 | + | |
1418 | 1418 |
| |
1419 | 1419 |
| |
1420 | 1420 |
| |
1421 | 1421 |
| |
1422 |
| - | |
1423 | 1422 |
| |
1424 | 1423 |
| |
1425 | 1424 |
| |
1426 |
| - | |
1427 | 1425 |
| |
1428 | 1426 |
| |
1429 |
| - | |
1430 |
| - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1431 | 1437 |
| |
1432 |
| - | |
1433 |
| - | |
1434 |
| - | |
1435 |
| - | |
1436 | 1438 |
| |
1437 | 1439 |
| |
1438 | 1440 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
53 | 66 |
| |
54 | 67 |
| |
55 | 68 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
53 | 69 |
| |
54 | 70 |
| |
55 | 71 |
| |
|
0 commit comments
Comments
(0)