pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: John Zhang <jzhang@jimmy.harvard.edu>
To: pgsql-sql@postgresql.org
Subject: Re: copy files to postgresql
Date: Tue, 6 Aug 2002 06:23:25 -0700 (PDT)
Message-ID: <20020806132325.38254.qmail@web20809.mail.yahoo.com> (raw)
In-Reply-To: <200208061214.IAA02714@blaise.dfci.harvard.edu>

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 <jzhang@jimmy.harvard.edu> 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



view thread (4+ messages)  latest in thread

Message-ID: <20020806132325.38254.qmail@web20809.mail.yahoo.com>
Permalink:  ../20020806132325.38254.qmail@web20809.mail.yahoo.com/
Also on:    postgresql.org/message-id/20020806132325.38254.qmail@web20809.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jeff_eckermann@yahoo.com, jzhang@jimmy.harvard.edu
  Subject: Re: copy files to postgresql
  In-Reply-To: <20020806132325.38254.qmail@web20809.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox