Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E8D7C9F9B6E for ; Fri, 14 Sep 2007 09:03:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 30057-06 for ; Fri, 14 Sep 2007 09:03:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.planetcobalt.net (mail.planetcobalt.net [217.10.9.49]) by postgresql.org (Postfix) with ESMTP id E70409F9B5B for ; Fri, 14 Sep 2007 09:03:23 -0300 (ADT) Received: by mail.planetcobalt.net (Postfix, from userid 1000) id A34C03C00084; Fri, 14 Sep 2007 14:03:21 +0200 (CEST) Date: Fri, 14 Sep 2007 14:03:21 +0200 From: Ansgar -59cobalt- Wiechers To: pgsql-performance@postgresql.org Subject: Re: Regarding COPY command from Postgres 8.2.0 Message-ID: <20070914120321.GA2615@mail.planetcobalt.net> References: <9f2e40a90709140321l11e6cdb5g91d8f8bf0a43fd01@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f2e40a90709140321l11e6cdb5g91d8f8bf0a43fd01@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/274 X-Sequence-Number: 26819 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