Re: Can COPY skip columns?

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

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Boucher 2004-11-18 17:18:30 Re: index and queries using '<' '>'
Previous Message Joshua D. Drake 2004-11-18 17:11:56 Re: Can COPY skip columns?