Re: Ragged CSV import

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Ragged CSV import
Date: 2009-09-09 20:50:09
Message-ID: 4AA81501.3020602@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus wrote:
> On 9/9/09 12:59 PM, Andrew Dunstan wrote:
>
>> I have received a requirement for the ability to import ragged CSV
>> files, i.e. files that contain variable numbers of columns per row. The
>> requirement is that extra columns would be ignored and missing columns
>> filled with NULL. The client wanting this has wrestled with some
>> preprocessors to try to get what they want, but they would feel happier
>> with this built in. This isn't the first time I have received this
>> request since we implemented CSV import. People have complained on
>> numerous occasions about the strictness of the import routines w.r.t.
>> the number of columns.
>>
>
> Would this just work on columns on the end, or would it work on the
> basis of parsing the CSV header and matching columns?
>
> While the former functionality would be relatively simple, I think the
> latter is what people really want.
>
>

No, it's the former, and that's exactly what the client requested. I'm
not talking about parsing the header line - that's a much larger can of
worms.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sam Mason 2009-09-09 20:51:40 Re: RfD: more powerful "any" types
Previous Message Kevin Grittner 2009-09-09 20:47:48 Re: Ragged CSV import