Re: [HACKERS] multiline CSV fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] multiline CSV fields
Date: 2004-12-03 00:10:51
Message-ID: 9988.1102032651@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> + if (!embedded_line_warning && (c == '\n' || c == '\r') )
> + {
> + embedded_line_warning = true;
> + elog(WARNING,
> + "CSV fields with embedded linefeed or carriage return "
> + "characters might not be able to be reimported");
> + }

What about forcibly translating them to the two-character sequences \n
or \r? Or is that not considered a CSV-compatible representation?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-12-03 00:11:56 Re: 8.0RC1 tomorrow
Previous Message Tom Lane 2004-12-03 00:07:17 Re: nodeAgg perf tweak

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-12-03 00:27:03 Re: [HACKERS] multiline CSV fields
Previous Message Andrew Dunstan 2004-12-02 23:58:29 Re: [HACKERS] multiline CSV fields