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

Commitf1d1ca9

Browse files
committed
Fix ill-advised usage of x?y:z expressions in errmsg() and errhint() calls.
This prevented gettext from recognizing the strings that need to betranslated.
1 parent16adaf1 commitf1d1ca9

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

‎src/backend/commands/copy.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.291 2007/12/2716:45:22 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.292 2007/12/2717:00:56 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2420,12 +2420,12 @@ CopyReadLineText(CopyState cstate)
24202420
if (cstate->eol_type==EOL_CRNL)
24212421
ereport(ERROR,
24222422
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
2423-
errmsg(!cstate->csv_mode ?
2424-
"literal carriage return found in data" :
2425-
"unquoted carriage return found in data"),
2426-
errhint(!cstate->csv_mode ?
2427-
"Use \"\\r\" to represent carriage return." :
2428-
"Use quoted CSV field to represent carriage return.")));
2423+
!cstate->csv_mode ?
2424+
errmsg("literal carriage return found in data") :
2425+
errmsg("unquoted carriage return found in data"),
2426+
!cstate->csv_mode ?
2427+
errhint("Use \"\\r\" to represent carriage return.") :
2428+
errhint("Use quoted CSV field to represent carriage return.")));
24292429

24302430
/*
24312431
* if we got here, it is the first line and we didn't find
@@ -2437,12 +2437,12 @@ CopyReadLineText(CopyState cstate)
24372437
elseif (cstate->eol_type==EOL_NL)
24382438
ereport(ERROR,
24392439
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
2440-
errmsg(!cstate->csv_mode ?
2441-
"literal carriage return found in data" :
2442-
"unquoted carriage return found in data"),
2443-
errhint(!cstate->csv_mode ?
2444-
"Use \"\\r\" to represent carriage return." :
2445-
"Use quoted CSV field to represent carriage return.")));
2440+
!cstate->csv_mode ?
2441+
errmsg("literal carriage return found in data") :
2442+
errmsg("unquoted carriage return found in data"),
2443+
!cstate->csv_mode ?
2444+
errhint("Use \"\\r\" to represent carriage return.") :
2445+
errhint("Use quoted CSV field to represent carriage return.")));
24462446
/* If reach here, we have found the line terminator */
24472447
break;
24482448
}
@@ -2453,12 +2453,12 @@ CopyReadLineText(CopyState cstate)
24532453
if (cstate->eol_type==EOL_CR||cstate->eol_type==EOL_CRNL)
24542454
ereport(ERROR,
24552455
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
2456-
errmsg(!cstate->csv_mode ?
2457-
"literal newline found in data" :
2458-
"unquoted newline found in data"),
2459-
errhint(!cstate->csv_mode ?
2460-
"Use \"\\n\" to represent newline." :
2461-
"Use quoted CSV field to represent newline.")));
2456+
!cstate->csv_mode ?
2457+
errmsg("literal newline found in data") :
2458+
errmsg("unquoted newline found in data"),
2459+
!cstate->csv_mode ?
2460+
errhint("Use \"\\n\" to represent newline.") :
2461+
errhint("Use quoted CSV field to represent newline.")));
24622462
cstate->eol_type=EOL_NL;/* in case not set yet */
24632463
/* If reach here, we have found the line terminator */
24642464
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp