Re: bug in COPY

From: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug in COPY
Date: 2002-07-24 22:32:00
Message-ID: 20020724223200.GA17263@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 24, 2002 at 04:23:56PM -0400, Tom Lane wrote:
> nconway(at)klamath(dot)dyndns(dot)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(at)rogers(dot)com>
PGP Key ID: DB3C29FC

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2002-07-24 22:52:44 regression in CVS HEAD
Previous Message Marc Lavergne 2002-07-24 21:27:25 Re: CREATE SYNONYM suggestions