Re: Can COPY skip columns?

From: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can COPY skip columns?
Date: 2004-11-18 18:44:24
Message-ID: BDC29E08.3C269%awitney@sghms.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 18/11/04 5:15 pm, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Adam Witney <awitney(at)sghms(dot)ac(dot)uk> writes:
>> Is it possible for the COPY command to read data from a file, but skip
>> specific columns?
>
> Nope. When you get into significant massaging of the input data,
> usually the best bet is to COPY into a temp table that exactly matches
> the format of the data file, and then do your rearrangements using an
> INSERT/SELECT into the final target table.

Ah ok. Can COPY be made to skip the first row then? To avoid the column
headers?

Thanks

adam

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2004-11-18 18:48:14 Re: How to make a good documentation of a database ?
Previous Message Joshua D. Drake 2004-11-18 18:13:41 Re: Certifications in military environment