Re: Can COPY skip columns?

From: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can COPY skip columns?
Date: 2004-11-18 17:11:20
Message-ID: BDC28838.3C243%awitney@sghms.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi Joshua,

Sorry, I meant skip a column in the file, not the database table, or is that
what you meant?

Thanks

adam

> Adam Witney wrote:
>> Hi,
>>
>> Is it possible for the COPY command to read data from a file, but skip
>> specific columns?
>
> \h copy
>
> COPY tablename [ ( column [, ...] ) ]
> TO { 'filename' | STDOUT }
> [ [ WITH ]
> [ BINARY ]
> [ OIDS ]
> [ DELIMITER [ AS ] 'delimiter' ]
> [ NULL [ AS ] 'null string' ]
> [ CSV [ QUOTE [ AS ] 'quote' ]
> [ ESCAPE [ AS ] 'escape' ]
> [ FORCE QUOTE column [, ...] ]
>
> Yes.. you just have to specify the columns...
>
> Sincerely,
>
> Joshua D. Drake
>
>
>>
>> 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 Joshua D. Drake 2004-11-18 17:11:56 Re: Can COPY skip columns?
Previous Message Bill Harris 2004-11-18 16:55:06 Re: How to make a good documentation of a database ?