@@ -77,21 +77,21 @@ COPY x from stdin (encoding 'sql_ascii', encoding 'sql_ascii');
7777ERROR: conflicting or redundant options
7878LINE 1: COPY x from stdin (encoding 'sql_ascii', encoding 'sql_ascii...
7979 ^
80- COPY x from stdin (save_error_to none,save_error_to none );
80+ COPY x from stdin (on_error ignore, on_error ignore );
8181ERROR: 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+ ^
8484-- incorrect options
8585COPY x to stdin (format BINARY, delimiter ',');
8686ERROR: cannot specify DELIMITER in BINARY mode
8787COPY x to stdin (format BINARY, null 'x');
8888ERROR: 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+ ^
9595COPY x to stdin (format TEXT, force_quote(a));
9696ERROR: COPY FORCE_QUOTE requires CSV mode
9797COPY x from stdin (format CSV, force_quote(a));
@@ -104,9 +104,9 @@ COPY x to stdout (format TEXT, force_null(a));
104104ERROR: COPY FORCE_NULL requires CSV mode
105105COPY x to stdin (format CSV, force_null(a));
106106ERROR: 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);
110110 ^
111111-- too many columns in column list: should fail
112112COPY x (a, b, c, d, e, d, c) from stdin;
@@ -724,12 +724,12 @@ SELECT * FROM instead_of_insert_tbl;
724724(2 rows)
725725
726726COMMIT;
727- -- tests for SAVE_ERROR_TO option
727+ -- tests for on_error option
728728CREATE 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 );
730730ERROR: invalid input syntax for type integer: "a"
731731CONTEXT: 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 );
733733NOTICE: 4 rows were skipped due to data type incompatibility
734734SELECT * FROM check_ign_err;
735735 n | m | k
@@ -740,15 +740,15 @@ SELECT * FROM check_ign_err;
740740
741741-- test datatype error that can't be handled as soft: should fail
742742CREATE 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 );
744744ERROR: invalid input syntax for type widget: "1"
745745CONTEXT: COPY hard_err, line 1, column foo: "1"
746746-- 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 );
748748ERROR: missing data for column "k"
749749CONTEXT: COPY check_ign_err, line 1: "1 {1}"
750750-- 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 );
752752ERROR: extra data after last expected column
753753CONTEXT: COPY check_ign_err, line 1: "1 {1} 3 abc"
754754-- clean up
0 commit comments