8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.291 2007/12/27 16:45:22 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.292 2007/12/27 17:00:56 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -2420,12 +2420,12 @@ CopyReadLineText(CopyState cstate)
2420
2420
if (cstate -> eol_type == EOL_CRNL )
2421
2421
ereport (ERROR ,
2422
2422
(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." )));
2429
2429
2430
2430
/*
2431
2431
* if we got here, it is the first line and we didn't find
@@ -2437,12 +2437,12 @@ CopyReadLineText(CopyState cstate)
2437
2437
else if (cstate -> eol_type == EOL_NL )
2438
2438
ereport (ERROR ,
2439
2439
(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." )));
2446
2446
/* If reach here, we have found the line terminator */
2447
2447
break ;
2448
2448
}
@@ -2453,12 +2453,12 @@ CopyReadLineText(CopyState cstate)
2453
2453
if (cstate -> eol_type == EOL_CR || cstate -> eol_type == EOL_CRNL )
2454
2454
ereport (ERROR ,
2455
2455
(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." )));
2462
2462
cstate -> eol_type = EOL_NL ; /* in case not set yet */
2463
2463
/* If reach here, we have found the line terminator */
2464
2464
break ;
0 commit comments