Re: COPY incorrectly uses null instead of an empty string in last field - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY incorrectly uses null instead of an empty string in last field
Date
Msg-id 25800.1014826890@sss.pgh.pa.us
Whole thread Raw
In response to COPY incorrectly uses null instead of an empty string in last field  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-hackers
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> But there will be new syntax for COPY, that allows missing trailing columns. 
> I hope.
>> 
>> Why?

> Well, good question. For one for backwards compatibility.

It's an undocumented feature.  How many people are likely to be using it?

> I guess I would prefer COPY syntax that allows you to specify columns
> as has been previously discussed.

Yes, that's on the to-do list as well.  But no matter what the expected
set of columns is, COPY ought to complain if a line is missing some
fields.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Henshall, Stuart - WCP"
Date:
Subject: Re: eWeek Poll: Which database is most critical to your
Next
From: Stephan Szabo
Date:
Subject: Re: Yet again on indices...