Re: surppressing column names in COPY format

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: surppressing column names in COPY format
Date: 2003-07-31 21:21:59
Message-ID: 19305.1059686519@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> On Thu, 2003-07-31 at 16:50, Tom Lane wrote:
>> None; we just haven't gotten around to removing code that no longer
>> pulls its weight. The no-column-name variant is just as dangerous as
>> it was in the COPY case, IMHO.

> by dangerous you mean functional right?

:-)

By dangerous I mean "might not restore the table correctly". There are
scenarios involving child tables and ALTER TABLE ADD COLUMN where a
column-name-less INSERT or COPY will dump the data in a different column
order than pg_dump's CREATE TABLE command will create. Before 7.3 it
was in fact not possible to dump and reload the regression-test database
using COPY, because of this problem --- perhaps that causes me to
overstate its importance, but there is a definite risk.

> would a patch to remove this dead code (the insert without column case)
> be accepted for 7.4?

Not for 7.4, because we're past feature freeze, but I wouldn't object to
removing it in 7.5.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-07-31 21:43:10 Re: CAST INTERVAL to INT??
Previous Message Ron Johnson 2003-07-31 21:17:05 Re: Transactions across multiples databases