Re: unused columns in copy - Mailing list pgsql-sql

FromMarcin Stępnicki
SubjectRe: unused columns in copy
Date
Msg-id[email protected]
Whole thread Raw
In response tounused columns in copy  (chester c young <[email protected]>)
ResponsesRe: unused columns in copy
Listpgsql-sql
On Mon, Jul 20, 2009 at 3:22 PM, chester c young<[email protected]> wrote:
>
> is there a way for COPY FROM to ignore unused columns in CSV?
>
> in other words, if table t1 has columns c1, c2, and if csv has columns c1, c3, c2, could I do something like
>
> COPY t1( c1, null, c2 ) FROM 'file.csv'

No, but you can use pgloader which can easily deal with your problem
and much more. http://pgfoundry.org/projects/pgloader/


pgsql-sql by date:

Previous
From: Andreas Wenk
Date:
Subject: Re: Table inheritance problem
Next
From: nha
Date:
Subject: Re: how to tell if column set on update