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

Commit7bd099d

Browse files
committed
Update spelling of COPY options
The preferred spelling was changed from FORCE QUOTE to FORCE_QUOTE andthe like, but some code was still referring to the old spellings.
1 parentb9f117d commit7bd099d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎src/backend/commands/copy.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ typedef struct CopyStateData
121121
char*quote;/* CSV quote char (must be 1 byte) */
122122
char*escape;/* CSV escape char (must be 1 byte) */
123123
List*force_quote;/* list of column names */
124-
boolforce_quote_all;/*FORCE QUOTE *? */
124+
boolforce_quote_all;/*FORCE_QUOTE *? */
125125
bool*force_quote_flags;/* per-column CSV FQ flags */
126126
List*force_notnull;/* list of column names */
127127
bool*force_notnull_flags;/* per-column CSV FNN flags */
@@ -1469,7 +1469,7 @@ BeginCopy(bool is_from,
14691469

14701470
num_phys_attrs=tupDesc->natts;
14711471

1472-
/* ConvertFORCE QUOTE name list to per-column flags, check validity */
1472+
/* ConvertFORCE_QUOTE name list to per-column flags, check validity */
14731473
cstate->force_quote_flags= (bool*)palloc0(num_phys_attrs*sizeof(bool));
14741474
if (cstate->force_quote_all)
14751475
{
@@ -1492,13 +1492,13 @@ BeginCopy(bool is_from,
14921492
if (!list_member_int(cstate->attnumlist,attnum))
14931493
ereport(ERROR,
14941494
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
1495-
errmsg("FORCE QUOTE column \"%s\" not referenced by COPY",
1495+
errmsg("FORCE_QUOTE column \"%s\" not referenced by COPY",
14961496
NameStr(tupDesc->attrs[attnum-1]->attname))));
14971497
cstate->force_quote_flags[attnum-1]= true;
14981498
}
14991499
}
15001500

1501-
/* ConvertFORCE NOT NULL name list to per-column flags, check validity */
1501+
/* ConvertFORCE_NOT_NULL name list to per-column flags, check validity */
15021502
cstate->force_notnull_flags= (bool*)palloc0(num_phys_attrs*sizeof(bool));
15031503
if (cstate->force_notnull)
15041504
{
@@ -1514,13 +1514,13 @@ BeginCopy(bool is_from,
15141514
if (!list_member_int(cstate->attnumlist,attnum))
15151515
ereport(ERROR,
15161516
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
1517-
errmsg("FORCE NOT NULL column \"%s\" not referenced by COPY",
1517+
errmsg("FORCE_NOT_NULL column \"%s\" not referenced by COPY",
15181518
NameStr(tupDesc->attrs[attnum-1]->attname))));
15191519
cstate->force_notnull_flags[attnum-1]= true;
15201520
}
15211521
}
15221522

1523-
/* ConvertFORCE NULL name list to per-column flags, check validity */
1523+
/* ConvertFORCE_NULL name list to per-column flags, check validity */
15241524
cstate->force_null_flags= (bool*)palloc0(num_phys_attrs*sizeof(bool));
15251525
if (cstate->force_null)
15261526
{
@@ -1536,7 +1536,7 @@ BeginCopy(bool is_from,
15361536
if (!list_member_int(cstate->attnumlist,attnum))
15371537
ereport(ERROR,
15381538
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
1539-
errmsg("FORCE NULL column \"%s\" not referenced by COPY",
1539+
errmsg("FORCE_NULL column \"%s\" not referenced by COPY",
15401540
NameStr(tupDesc->attrs[attnum-1]->attname))));
15411541
cstate->force_null_flags[attnum-1]= true;
15421542
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,12 @@ ROLLBACK;
421421
-- should fail with "not referenced by COPY" error
422422
BEGIN;
423423
COPY forcetest (d, e) FROM STDIN WITH (FORMAT csv, FORCE_NOT_NULL(b));
424-
ERROR:FORCE NOT NULL column "b" not referenced by COPY
424+
ERROR:FORCE_NOT_NULL column "b" not referenced by COPY
425425
ROLLBACK;
426426
-- should fail with "not referenced by COPY" error
427427
BEGIN;
428428
COPY forcetest (d, e) FROM STDIN WITH (FORMAT csv, FORCE_NULL(b));
429-
ERROR:FORCE NULL column "b" not referenced by COPY
429+
ERROR:FORCE_NULL column "b" not referenced by COPY
430430
ROLLBACK;
431431
\pset null ''
432432
-- test case with whole-row Var in a check constraint

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp