Re: Different length lines in COPY CSV - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Different length lines in COPY CSV
Date
Msg-id 200512120455.jBC4tnh03411@candle.pha.pa.us
Whole thread Raw
In response to Different length lines in COPY CSV  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: Different length lines in COPY CSV
List pgsql-hackers
Christopher Kings-Lynne wrote:
> Hi,
> 
> Is there any way to force COPY to accept that there will be lines of 
> different length in a data file?
> 
> I have a rather large file I'm trying to import.  It's in CSV format, 
> however, they leave off trailing empty columns on most lines.
> 
> Any way to do this?  Should it be supported by CSV mode?

No there is not, partly so we can complain that the file is corrupt, and
partly because we are unsure what to make the missing values, NULL?

I suppose we could have a TRAILINGNULL flag to COPY but because few ask
for this feature, it hardly seems worth it.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Different length lines in COPY CSV
Next
From: Tom Lane
Date:
Subject: Re: Different length lines in COPY CSV