Dominique:
On Fri, 11 Mar 2022 at 21:13, Dominique Devienne wrote:
> But sure, if TEXT does the kind of pseudo-CSV I need, I'd change it to use it.
Text, the original format for copy, is much easier to manage than CSV.
It can easily be managed as you can split the whole input on newlines
to get
Hi Daniel:
On Fri, 11 Mar 2022 at 19:38, Daniel Verite wrote:
> > These values are 'normal'. I'm not use to CSV, but I suppose
> > such newlines
> > must be encoded, perhaps as \n, since AFAIK CSV needs to be 1 line per row,
> > no?
> No, but such fields must be enclosed by double quotes, as docu
On Fri, Mar 11, 2022 at 8:32 PM Daniel Verite wrote:
> Dominique Devienne wrote:
> > so I can easily do that "\n" encoding myself, as a post-processing on
> > the buffer I get back.
>
> Alternatively, it might be easier to use the default TEXT format of
> COPY rather than CSV, as the TEXT
Dominique Devienne wrote:
> so I can easily do that "\n" encoding myself, as a post-processing on
> the buffer I get back.
Alternatively, it might be easier to use the default TEXT format of
COPY rather than CSV, as the TEXT format already produces \n for
line feeds, along with half a d
On Fri, Mar 11, 2022 at 7:38 PM Daniel Verite wrote:
>> Dominique Devienne wrote:
> > These values are 'normal'. I'm not used to CSV, but I suppose such newlines
> > must be encoded, perhaps as \n, since AFAIK CSV needs to be 1 line per row,
> > no?
>
> No, but such fields must be enclose
Dominique Devienne wrote:
> These values are 'normal'. I'm not use to CSV, but I suppose
> such newlines
> must be encoded, perhaps as \n, since AFAIK CSV needs to be 1 line per row,
> no?
No, but such fields must be enclosed by double quotes, as documented
in RFC 4180 https://datatracker
On Friday, March 11, 2022, Dominique Devienne wrote:
> I've tracked these to text values in the DB with embedded
>
newlines. These values are 'normal'. I'm not use to CSV, but I suppose
> such newlines
> must be encoded, perhaps as \n, since AFAIK CSV needs to be 1 line per
> row, no?
Haven’t t
Hi.
It's my first time using COPY TO. And first time using built-in CSV support.
Performs well. BUT...
The code below (real code, but using a custom libpq wrapper lib) is run on
a few tables, with unit tests that verify the number of lines of the
output file.
And for a few of those tables, there'