Re: Regarding COPY command from Postgres 8.2.0 - Mailing list pgsql-performance

From Ansgar -59cobalt- Wiechers
Subject Re: Regarding COPY command from Postgres 8.2.0
Date
Msg-id 20070914120321.GA2615@mail.planetcobalt.net
Whole thread Raw
In response to Regarding COPY command from Postgres 8.2.0  ("soni de" <soni.de@gmail.com>)
Responses Re: Regarding COPY command from Postgres 8.2.0  ("soni de" <soni.de@gmail.com>)
List pgsql-performance
On 2007-09-14 soni de wrote:
> In Postgres 7.2.4, COPY command is working fine even if tables have 6
> fields but we are copying only 5 fields from the file
>
> But in Postgres 8.2.0, if table has 6 fields and we need to copy data
> for 5 fields only, then we need to specify the column names too in
> COPY command.
>
> Is there any configurable option, so that without specifying column
> name in COPY command we can copy records in table as happened in
> Postgres 7.2.4?

I don't know if it is possible, but even if it were I'd strongly
recommend against it, as you'd be relying on the order the columns were
created in. That's a rather bad idea IMHO. Why would you want to avoid
giving the names of the columns in the first place?

Regards
Ansgar Wiechers
--
"The Mac OS X kernel should never panic because, when it does, it
seriously inconveniences the user."
--http://developer.apple.com/technotes/tn2004/tn2118.html

pgsql-performance by date:

Previous
From: db@zigo.dhs.org
Date:
Subject: Re: Long Running Commits - Not Checkpoints
Next
From: Jean-David Beyer
Date:
Subject: Re: Index files