@@ -77,21 +77,21 @@ COPY x from stdin (encoding 'sql_ascii', encoding 'sql_ascii');
77
77
ERROR: conflicting or redundant options
78
78
LINE 1: COPY x from stdin (encoding 'sql_ascii', encoding 'sql_ascii...
79
79
^
80
- COPY x from stdin (save_error_to none,save_error_to none );
80
+ COPY x from stdin (on_error ignore, on_error ignore );
81
81
ERROR: conflicting or redundant options
82
- LINE 1: COPY x from stdin (save_error_to none,save_error_to none );
83
- ^
82
+ LINE 1: COPY x from stdin (on_error ignore, on_error ignore );
83
+ ^
84
84
-- incorrect options
85
85
COPY x to stdin (format BINARY, delimiter ',');
86
86
ERROR: cannot specify DELIMITER in BINARY mode
87
87
COPY x to stdin (format BINARY, null 'x');
88
88
ERROR: cannot specify NULL in BINARY mode
89
- COPY x from stdin (format BINARY, save_error_to none );
90
- ERROR: cannot specify SAVE_ERROR_TO in BINARY mode
91
- COPY x to stdin (save_error_to none );
92
- ERROR: COPY SAVE_ERROR_TO cannot be used with COPY TO
93
- LINE 1: COPY x to stdin (save_error_to none );
94
- ^
89
+ COPY x from stdin (format BINARY, on_error ignore );
90
+ ERROR: only ON_ERROR STOP is allowed in BINARY mode
91
+ COPY x from stdin (on_error unsupported );
92
+ ERROR: COPY ON_ERROR "unsupported" not recognized
93
+ LINE 1: COPY x from stdin (on_error unsupported );
94
+ ^
95
95
COPY x to stdin (format TEXT, force_quote(a));
96
96
ERROR: COPY FORCE_QUOTE requires CSV mode
97
97
COPY x from stdin (format CSV, force_quote(a));
@@ -104,9 +104,9 @@ COPY x to stdout (format TEXT, force_null(a));
104
104
ERROR: COPY FORCE_NULL requires CSV mode
105
105
COPY x to stdin (format CSV, force_null(a));
106
106
ERROR: COPY FORCE_NULL cannot be used with COPY TO
107
- COPY x to stdin (format BINARY, save_error_to unsupported);
108
- ERROR: COPY SAVE_ERROR_TO cannot be used with COPY TO
109
- LINE 1: COPY x to stdin (format BINARY, save_error_to unsupported);
107
+ COPY x to stdin (format BINARY, on_error unsupported);
108
+ ERROR: COPY ON_ERROR cannot be used with COPY TO
109
+ LINE 1: COPY x to stdin (format BINARY, on_error unsupported);
110
110
^
111
111
-- too many columns in column list: should fail
112
112
COPY x (a, b, c, d, e, d, c) from stdin;
@@ -724,12 +724,12 @@ SELECT * FROM instead_of_insert_tbl;
724
724
(2 rows)
725
725
726
726
COMMIT;
727
- -- tests for SAVE_ERROR_TO option
727
+ -- tests for on_error option
728
728
CREATE TABLE check_ign_err (n int, m int[], k int);
729
- COPY check_ign_err FROM STDIN WITH (save_error_to error );
729
+ COPY check_ign_err FROM STDIN WITH (on_error stop );
730
730
ERROR: invalid input syntax for type integer: "a"
731
731
CONTEXT: COPY check_ign_err, line 2, column n: "a"
732
- COPY check_ign_err FROM STDIN WITH (save_error_to none );
732
+ COPY check_ign_err FROM STDIN WITH (on_error ignore );
733
733
NOTICE: 4 rows were skipped due to data type incompatibility
734
734
SELECT * FROM check_ign_err;
735
735
n | m | k
@@ -740,15 +740,15 @@ SELECT * FROM check_ign_err;
740
740
741
741
-- test datatype error that can't be handled as soft: should fail
742
742
CREATE TABLE hard_err(foo widget);
743
- COPY hard_err FROM STDIN WITH (save_error_to none );
743
+ COPY hard_err FROM STDIN WITH (on_error ignore );
744
744
ERROR: invalid input syntax for type widget: "1"
745
745
CONTEXT: COPY hard_err, line 1, column foo: "1"
746
746
-- test missing data: should fail
747
- COPY check_ign_err FROM STDIN WITH (save_error_to none );
747
+ COPY check_ign_err FROM STDIN WITH (on_error ignore );
748
748
ERROR: missing data for column "k"
749
749
CONTEXT: COPY check_ign_err, line 1: "1 {1}"
750
750
-- test extra data: should fail
751
- COPY check_ign_err FROM STDIN WITH (save_error_to none );
751
+ COPY check_ign_err FROM STDIN WITH (on_error ignore );
752
752
ERROR: extra data after last expected column
753
753
CONTEXT: COPY check_ign_err, line 1: "1 {1} 3 abc"
754
754
-- clean up
0 commit comments