Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit08909e3

Browse files
committed
Simplify and clarify an error message
1 parentf340f97 commit08909e3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎src/backend/commands/copyfromparse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ NextCopyFromRawFields(CopyFromState cstate, char ***fields, int *nfields)
782782
if (fldct!=list_length(cstate->attnumlist))
783783
ereport(ERROR,
784784
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
785-
errmsg("wrong number of fields in header line:field count is %d, expected %d",
785+
errmsg("wrong number of fields in header line:got %d, expected %d",
786786
fldct,list_length(cstate->attnumlist))));
787787

788788
fldnum=0;

‎src/test/regress/expected/copy.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ copy header_copytest from stdin with (header match);
201201
ERROR: column name mismatch in header line field 3: got null value ("\N"), expected "c"
202202
CONTEXT: COPY header_copytest, line 1: "ab\N"
203203
copy header_copytest from stdin with (header match);
204-
ERROR: wrong number of fields in header line:field count is 2, expected 3
204+
ERROR: wrong number of fields in header line:got 2, expected 3
205205
CONTEXT: COPY header_copytest, line 1: "ab"
206206
copy header_copytest from stdin with (header match);
207-
ERROR: wrong number of fields in header line:field count is 4, expected 3
207+
ERROR: wrong number of fields in header line:got 4, expected 3
208208
CONTEXT: COPY header_copytest, line 1: "abcd"
209209
copy header_copytest from stdin with (header match);
210210
ERROR: column name mismatch in header line field 3: got "d", expected "c"
@@ -224,10 +224,10 @@ copy header_copytest (c, a) from stdin with (header match);
224224
copy header_copytest (a, c) from stdin with (header match);
225225
-- errors
226226
copy header_copytest from stdin with (header match);
227-
ERROR: wrong number of fields in header line:field count is 3, expected 2
227+
ERROR: wrong number of fields in header line:got 3, expected 2
228228
CONTEXT: COPY header_copytest, line 1: "a........pg.dropped.2........c"
229229
copy header_copytest (a, c) from stdin with (header match);
230-
ERROR: wrong number of fields in header line:field count is 3, expected 2
230+
ERROR: wrong number of fields in header line:got 3, expected 2
231231
CONTEXT: COPY header_copytest, line 1: "acb"
232232
SELECT * FROM header_copytest ORDER BY a;
233233
a | c

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp