Re: Ignore when using COPY FROM - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Ignore when using COPY FROM
Date
Msg-id 200010161610.MAA09176@candle.pha.pa.us
Whole thread Raw
In response to Re: Ignore when using COPY FROM  (Fredrick Bartlett <palmtreefrb@earthlink.net>)
List pgsql-general
Added to TODO:

    * Allow COPY to specify column names

> Yes,  I have same problem.  This functionality is "almost" standard,
> and
> found on other RDBMS.  How do new features get added to the todo list's.
> Where can I view the current todo list?
>
> Fredrick
>
> Matthew Kennedy wrote:
>
> > I have a ton of data in a text delimited file from an old legacy system.
> > When uploading it into postgres, I'd do something like this:
> >
> >         COPY stuff FROM 'stuff.txt' USING DELIMITERS = '|';
> >
> > The problem is some of the rows in stuff.txt may not conform to the
> > stuff table attributes (duplicate keys, for example). The command above
> > terminates with no change to the table stuff when it encounters an error
> > in stuff.txt. Is there a way to have postgres ignore erroneous fields
> > but keep information about which fields weren't processed. I believe
> > Oracle has some support for this through an IGNORE clause.
>


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 7.1 Release Date
Next
From: Jim Mercer
Date:
Subject: Re: 7.1 Release Date