Re: multiline CSV fields

Поиск
Список
Период
Сортировка
Искать
От
Andrew Dunstan
Тема
Re: multiline CSV fields
Дата
Msg-id
41AFB2D7.9020000@dunslane.net
Ответ на
Список
Дерево обсуждения
multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: [PATCHES] multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Kris Jurka <books@ejurka.com>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Greg Stark <gsstark@mit.edu>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Bruce Momjian <pgman@candle.pha.pa.us>
Re: multiline CSV fields Greg Stark <gsstark@mit.edu>
Re: multiline CSV fields Ben.Young@risk.sungard.com
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Kris Jurka <books@ejurka.com>
Re: multiline CSV fields "Andrew Dunstan" <andrew@dunslane.net>
Re: multiline CSV fields Patrick B Kelly <pbk@patrickbkelly.org>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Patrick B Kelly <pbk@patrickbkelly.org>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Patrick B Kelly <pbk@patrickbkelly.org>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Patrick B Kelly <pbk@patrickbkelly.org>
Re: multiline CSV fields Tom Lane <tgl@sss.pgh.pa.us>
Re: multiline CSV fields Patrick B Kelly <pbk@patrickbkelly.org>
Re: multiline CSV fields Andrew Dunstan <andrew@dunslane.net>
Re: multiline CSV fields Greg Stark <gsstark@mit.edu>
Re: multiline CSV fields David Fetter <david@fetter.org>


Tom Lane wrote:

>Andrew Dunstan  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?
>
>
>  
>

Not compatible AFAIK. Certainly not portably. And the warning would 
still be true, because we don't do this unescaping on the way back in. I 
think the way the comment in the patch suggests and previous emails have 
discussed is the right way to go with this - I will attend to it after 
we branch ;-)

cheers

andrew
В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата:
Сообщение: Re: 8.0RC1 tomorrow
От: Peter Eisentraut
Дата:
Сообщение: Re: 8.0RC1 tomorrow
FAQ