Ragged CSV import - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Ragged CSV import
Date
Msg-id 4AA8093B.8030206@dunslane.net
Whole thread Raw
Responses Re: Ragged CSV import
Re: Ragged CSV import
List pgsql-hackers
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.

I don't think that providing a CSV import mode for reading these files 
will be very difficult or invasive. If it's not acceptable, I will 
provide it to the client as a patch, and I will be retrofitting it to 
8.4 anyway. But I think it's not an unreasonable request.

Thoughts?

cheers

andrew




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: RfD: more powerful "any" types
Next
From: Tom Lane
Date:
Subject: Re: Ragged CSV import