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)
24202420if (cstate -> eol_type == EOL_CRNL )
24212421ereport (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)
24372437else if (cstate -> eol_type == EOL_NL )
24382438ereport (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 */
24472447break ;
24482448}
@@ -2453,12 +2453,12 @@ CopyReadLineText(CopyState cstate)
24532453if (cstate -> eol_type == EOL_CR || cstate -> eol_type == EOL_CRNL )
24542454ereport (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." )));
24622462cstate -> eol_type = EOL_NL ;/* in case not set yet */
24632463/* If reach here, we have found the line terminator */
24642464break ;