forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9e2d870
committed
Add new COPY option SAVE_ERROR_TO
Currently, when source data contains unexpected data regarding data type orrange, the entire COPY fails. However, in some cases, such data can be ignoredand just copying normal data is preferable.This commit adds a new option SAVE_ERROR_TO, which specifies where to save theerror information. When this option is specified, COPY skips soft errors andcontinues copying.Currently, SAVE_ERROR_TO only supports "none". This indicates error informationis not saved and COPY just skips the unexpected data and continues running.Later works are expected to add more choices, such as 'log' and 'table'.Author: Damir Belyalov, Atsushi Torikoshi, Alex Shulgin, Jian HeDiscussion:https://postgr.es/m/87k31ftoe0.fsf_-_%40commandprompt.comReviewed-by: Pavel Stehule, Andres Freund, Tom Lane, Daniel Gustafsson,Reviewed-by: Alena Rybakina, Andy Fan, Andrei Lepikhov, Masahiko SawadaReviewed-by: Vignesh C, Atsushi Torikoshi1 parentc7e5e99 commit9e2d870
File tree
10 files changed
+239
-7
lines changed- doc/src/sgml/ref
- src
- backend/commands
- bin/psql
- include/commands
- test/regress
- expected
- sql
- tools/pgindent
10 files changed
+239
-7
lines changedLines changed: 22 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
373 | 374 |
| |
374 | 375 |
| |
375 | 376 |
| |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
376 | 396 |
| |
377 | 397 |
| |
378 | 398 |
| |
| |||
556 | 576 |
| |
557 | 577 |
| |
558 | 578 |
| |
559 |
| - | |
| 579 | + | |
| 580 | + | |
560 | 581 |
| |
561 | 582 |
| |
562 | 583 |
| |
|
Lines changed: 49 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
397 | 433 |
| |
398 | 434 |
| |
399 | 435 |
| |
| |||
419 | 455 |
| |
420 | 456 |
| |
421 | 457 |
| |
| 458 | + | |
422 | 459 |
| |
423 | 460 |
| |
424 | 461 |
| |
| |||
571 | 608 |
| |
572 | 609 |
| |
573 | 610 |
| |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
574 | 618 |
| |
575 | 619 |
| |
576 | 620 |
| |
| |||
598 | 642 |
| |
599 | 643 |
| |
600 | 644 |
| |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
601 | 650 |
| |
602 | 651 |
| |
603 | 652 |
| |
|
Lines changed: 48 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
| 45 | + | |
45 | 46 |
| |
46 | 47 |
| |
47 | 48 |
| |
| |||
656 | 657 |
| |
657 | 658 |
| |
658 | 659 |
| |
| 660 | + | |
| 661 | + | |
| 662 | + | |
659 | 663 |
| |
660 | 664 |
| |
661 | 665 |
| |
| |||
992 | 996 |
| |
993 | 997 |
| |
994 | 998 |
| |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
995 | 1018 |
| |
996 | 1019 |
| |
997 | 1020 |
| |
| |||
1284 | 1307 |
| |
1285 | 1308 |
| |
1286 | 1309 |
| |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1287 | 1318 |
| |
1288 | 1319 |
| |
1289 | 1320 |
| |
| |||
1419 | 1450 |
| |
1420 | 1451 |
| |
1421 | 1452 |
| |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
1422 | 1470 |
| |
1423 | 1471 |
| |
1424 | 1472 |
| |
|
Lines changed: 12 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| 73 | + | |
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
| |||
955 | 956 |
| |
956 | 957 |
| |
957 | 958 |
| |
958 |
| - | |
959 |
| - | |
960 |
| - | |
961 |
| - | |
962 |
| - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
963 | 970 |
| |
964 | 971 |
| |
965 | 972 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2898 | 2898 |
| |
2899 | 2899 |
| |
2900 | 2900 |
| |
2901 |
| - | |
| 2901 | + | |
| 2902 | + | |
2902 | 2903 |
| |
2903 | 2904 |
| |
2904 | 2905 |
| |
2905 | 2906 |
| |
2906 | 2907 |
| |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
2907 | 2912 |
| |
2908 | 2913 |
| |
2909 | 2914 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 |
| |
34 | 44 |
| |
35 | 45 |
| |
| |||
62 | 72 |
| |
63 | 73 |
| |
64 | 74 |
| |
| 75 | + | |
65 | 76 |
| |
66 | 77 |
| |
67 | 78 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
| |||
94 | 95 |
| |
95 | 96 |
| |
96 | 97 |
| |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 |
| |
98 | 103 |
| |
99 | 104 |
| |
|
Lines changed: 43 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 |
| |
81 | 85 |
| |
82 | 86 |
| |
83 | 87 |
| |
84 | 88 |
| |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
85 | 95 |
| |
86 | 96 |
| |
87 | 97 |
| |
| |||
94 | 104 |
| |
95 | 105 |
| |
96 | 106 |
| |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
97 | 111 |
| |
98 | 112 |
| |
99 | 113 |
| |
| |||
710 | 724 |
| |
711 | 725 |
| |
712 | 726 |
| |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
713 | 754 |
| |
714 | 755 |
| |
715 | 756 |
| |
| |||
724 | 765 |
| |
725 | 766 |
| |
726 | 767 |
| |
| 768 | + | |
| 769 | + | |
727 | 770 |
| |
728 | 771 |
| |
729 | 772 |
| |
|
0 commit comments
Comments
(0)