Re: csv format for psql - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: csv format for psql
Date
Msg-id CAKFQuwZE=itzNw3R3Z5um3ohGAt8KVq8bUwFEg47w7o2wYJVYg@mail.gmail.com
Whole thread Raw
In response to Re: csv format for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: csv format for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
On Fri, Mar 9, 2018 at 12:42 PM, Daniel Verite <daniel@manitou-mail.org> wrote:
        I wrote:

> recordsep in the unaligned mode doesn't play the role of a line ending
> because the last line is not finished by recordsep. According to the source
>code, this is intended, see print_unaligned_text() in print.c:

Something else comes to mind: CSV allows linefeeds inside fields, and
we don't want to replace these with record separators.
So the notion that recordsep can be used to choose line endings
is even less okay than if there was just the last line issue.


I'm not following - if recordsep is not something that would interpreted as a newline then the file we output would have not structural newlines.  It might have data newlines but those would be quoted.

David J.

pgsql-hackers by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: csv format for psql
Next
From: Alvaro Herrera
Date:
Subject: Re: FOR EACH ROW triggers on partitioned tables