Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0e319c7a
Commit
0e319c7a
authored
Sep 29, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve context display for failures during COPY IN, as recently
discussed on pghackers.
parent
34c64955
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
311 additions
and
210 deletions
+311
-210
src/backend/commands/copy.c
src/backend/commands/copy.c
+302
-201
src/test/regress/expected/alter_table.out
src/test/regress/expected/alter_table.out
+1
-1
src/test/regress/expected/copy2.out
src/test/regress/expected/copy2.out
+4
-4
src/test/regress/expected/domain.out
src/test/regress/expected/domain.out
+3
-3
src/test/regress/output/constraints.source
src/test/regress/output/constraints.source
+1
-1
No files found.
src/backend/commands/copy.c
View file @
0e319c7a
This diff is collapsed.
Click to expand it.
src/test/regress/expected/alter_table.out
View file @
0e319c7a
...
...
@@ -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
---+---
...
...
src/test/regress/expected/copy2.out
View file @
0e319c7a
...
...
@@ -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
...
...
src/test/regress/expected/domain.out
View file @
0e319c7a
...
...
@@ -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
------+------+------+------+------
...
...
src/test/regress/output/constraints.source
View file @
0e319c7a
...
...
@@ -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
---+---------------+---
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment