Re: CSV consecutive newline bug

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CSV consecutive newline bug
Date: 2005-05-12 01:18:57
Message-ID: 4282AF01.4090308@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway wrote:

> Andrew Dunstan wrote:
>
>> I have just been alerted to a bug in the 8.0 handling of embedded
>> newlines in CSV data. Basically it barfs on consecutive newlines. The
>> attached patch for 8.0 appears to fix it. The bug isn't present in
>> the HEAD branch, and I'm wondering if we should not backpatch the
>> HEAD multiline patch rather than applying this.
>
>
> Is there a particular reason to backport the larger patch? As a
> general rule I'm inclined to apply minimally-invasive fixes to stable
> branches, but I don't know the code in question, so perhaps there is
> some reason to make an exception in this case.

Well, if I'd known we were as far away from a release as we turned out
to be at the time the original multiline limitation was discovered, I
would have submitted a patch for inclusion in 8.0. Never mind -
hindsight doesn't help much. Just go with the tiny patch. If anyone
wants the later fix it's very easy to get, because it was the first
patch applied after 8.0 branched. Just dropping in the later version of
copy.c should work.

>
> Also, a regression test for this bug would be nice :)
>
>

regression patch against 8.0 branch attached.

cheers

andrew

Attachment Content-Type Size
nlregress.patch text/x-patch 1.4 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Sergey Ten 2005-05-12 02:01:50 patches for items from TODO list
Previous Message Neil Conway 2005-05-12 00:42:42 Re: CSV consecutive newline bug