Re: multiline CSV fields

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Patrick B Kelly <pbk(at)patrickbkelly(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: multiline CSV fields
Date: 2004-11-12 03:07:47
Message-ID: 41942903.4080208@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Patrick B Kelly wrote:

>
>
>
> My suggestion is to simply have CopyReadLine recognize these two
> states (in-field and out-of-field) and execute the current logic only
> while in the second state. It would not be too hard but as you
> mentioned it is non-trivial.
>
>
>

We don't know what state we expect the end of line to be in until after
we have actually read the line. To know how to treat the end of line on
your scheme we would have to parse as we go rather than after reading
the line as now. Changing this would be not only be non-trivial but
significantly invasive to the code.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Patrick B Kelly 2004-11-12 03:35:07 Re: multiline CSV fields
Previous Message Patrick B Kelly 2004-11-12 02:40:09 Re: multiline CSV fields

Browse pgsql-patches by date

  From Date Subject
Next Message Patrick B Kelly 2004-11-12 03:35:07 Re: multiline CSV fields
Previous Message Patrick B Kelly 2004-11-12 02:40:09 Re: multiline CSV fields