Re: bug in COPY - Mailing list pgsql-hackers

From nconway@klamath.dyndns.org (Neil Conway)
Subject Re: bug in COPY
Date
Msg-id 20020724223200.GA17263@klamath.dyndns.org
Whole thread Raw
In response to Re: bug in COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bug in COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jul 24, 2002 at 04:23:56PM -0400, Tom Lane wrote:
> nconway@klamath.dyndns.org (Neil Conway) writes:
> > This behavior doesn't look right:
> 
> It's not, but I believe the correct point of view is that the input
> data is defective and should be rejected.  See past discussions
> leading up to the TODO item that mentions rejecting COPY input rows
> with the wrong number of fields (rather than silently filling with
> NULLs as we do now).

Yeah, I was thinking that too. Now that we have column lists in
COPY, there is no need to keep this functionality around: if the
user wants to load data that is missing a column, they can just
omit the column from the column list and have the column default
inserted (which is a lot more sensible than inserting NULL).

Unfortunately, I think that removing this properly will require
refactoring some of the COPY code. I'll take a look at implementing
this...

Cheers,

Neil

-- 
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC


pgsql-hackers by date:

Previous
From: Marc Lavergne
Date:
Subject: Re: CREATE SYNONYM suggestions
Next
From: nconway@klamath.dyndns.org (Neil Conway)
Date:
Subject: regression in CVS HEAD