Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 26EC0475DD6 for ; Tue, 6 Aug 2002 09:23:22 -0400 (EDT) Received: from web20809.mail.yahoo.com (web20809.mail.yahoo.com [216.136.226.198]) by postgresql.org (Postfix) with SMTP id 373FE475DA4 for ; Tue, 6 Aug 2002 09:23:21 -0400 (EDT) Message-ID: <20020806132325.38254.qmail@web20809.mail.yahoo.com> Received: from [208.13.35.65] by web20809.mail.yahoo.com via HTTP; Tue, 06 Aug 2002 06:23:25 PDT Date: Tue, 6 Aug 2002 06:23:25 -0700 (PDT) From: Jeff Eckermann Subject: Re: copy files to postgresql To: John Zhang , pgsql-sql@postgresql.org In-Reply-To: <200208061214.IAA02714@blaise.dfci.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/87 X-Sequence-Number: 8933 I believe that soon-to-be-released version 7.3 will have the ability to import data to specific columns, as you are trying to do. For now, you will have to edit your input file to insert values (even if null) for the missing columns. The default null representation expected by COPY is "\N" (backslash, upper case "N"), or you can specify another using the syntax "\copy .... with null as 'whatever'" --- John Zhang wrote: > I was trying to copy files to columns of a > PostgreSQL database table using \copy > ( e. g. \copy mytable (column names here) from 'my > file' using delimiters '\t'). > PostgreSQL does not seem to like the column names > part. Could someone help me > with that? Thanks. > > Put the text of the welcome message here. > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com