diff options
| author | Tom Lane | 2003-09-29 22:06:40 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-09-29 22:06:40 +0000 |
| commit | 0e319c7ad7665673103f0b10752700fd2f33acd3 (patch) | |
| tree | 0341dc3c2c762c7b8a8f5d3d8ff2b5753c486f36 /src/test | |
| parent | 34c64955cdb987f40a466448ca624b1e4e8063fe (diff) | |
Improve context display for failures during COPY IN, as recently
discussed on pghackers.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/alter_table.out | 2 | ||||
| -rw-r--r-- | src/test/regress/expected/copy2.out | 8 | ||||
| -rw-r--r-- | src/test/regress/expected/domain.out | 6 | ||||
| -rw-r--r-- | src/test/regress/output/constraints.source | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 42b3e03f80b..0fb90a5e475 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -998,7 +998,7 @@ copy test("........pg.dropped.1........") to stdout; ERROR: column "........pg.dropped.1........" of relation "test" does not exist copy test from stdin; ERROR: extra data after last expected column -CONTEXT: COPY FROM, line 1 +CONTEXT: COPY test, line 1: "10 11 12" select * from test; b | c ---+--- diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out index a6e9ae27e28..df08fcd45a6 100644 --- a/src/test/regress/expected/copy2.out +++ b/src/test/regress/expected/copy2.out @@ -35,17 +35,17 @@ ERROR: column "d" specified more than once -- missing data: should fail COPY x from stdin; ERROR: invalid input syntax for integer: "" -CONTEXT: COPY FROM, line 1 +CONTEXT: COPY x, line 1, column a: "" COPY x from stdin; ERROR: missing data for column "e" -CONTEXT: COPY FROM, line 1 +CONTEXT: COPY x, line 1: "2000 230 23 23" COPY x from stdin; ERROR: missing data for column "e" -CONTEXT: COPY FROM, line 1 +CONTEXT: COPY x, line 1: "2001 231 \N \N" -- extra data: should fail COPY x from stdin; ERROR: extra data after last expected column -CONTEXT: COPY FROM, line 1 +CONTEXT: COPY x, line 1: "2002 232 40 50 60 70 80" -- various COPY options: delimiters, oids, NULL string COPY x (b, c, d, e) from stdin with oids delimiter ',' null 'x'; -- check results of copy in diff --git a/src/test/regress/expected/domain.out b/src/test/regress/expected/domain.out index 87a941e003c..b23e84e7288 100644 --- a/src/test/regress/expected/domain.out +++ b/src/test/regress/expected/domain.out @@ -40,7 +40,7 @@ INSERT INTO basictest values ('88', 'haha', 'short', '123.1212'); -- Truncate -- Test copy COPY basictest (testvarchar) FROM stdin; -- fail ERROR: value too long for type character varying(5) -CONTEXT: COPY FROM, line 1 +CONTEXT: COPY basictest, line 1: "notsoshorttext" COPY basictest (testvarchar) FROM stdin; select * from basictest; testint4 | testtext | testvarchar | testnumeric @@ -127,11 +127,11 @@ INSERT INTO nulltest values ('a', 'b', 'c', NULL, 'd'); -- Good -- Test copy COPY nulltest FROM stdin; --fail ERROR: domain dcheck does not allow null values -CONTEXT: COPY FROM, line 1 +CONTEXT: COPY nulltest, line 1: "a b \N d \N" -- Last row is bad COPY nulltest FROM stdin; ERROR: new row for relation "nulltest" violates check constraint "nulltest_col5" -CONTEXT: COPY FROM, line 3 +CONTEXT: COPY nulltest, line 3: "a b c \N a" select * from nulltest; col1 | col2 | col3 | col4 | col5 ------+------+------+------+------ diff --git a/src/test/regress/output/constraints.source b/src/test/regress/output/constraints.source index 48b75f8d8b1..7c1ac5e12d2 100644 --- a/src/test/regress/output/constraints.source +++ b/src/test/regress/output/constraints.source @@ -274,7 +274,7 @@ SELECT '' AS two, * FROM COPY_TBL; COPY COPY_TBL FROM '@abs_srcdir@/data/constrf.data'; ERROR: new row for relation "copy_tbl" violates check constraint "copy_con" -CONTEXT: COPY FROM, line 2 +CONTEXT: COPY copy_tbl, line 2: "7 check failed 6" SELECT * FROM COPY_TBL; x | y | z ---+---------------+--- |
