Search Postgresql Archives

Re: Can COPY skip columns?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux