From: chester c young <chestercyoung@yahoo.com>
To: sql pgsql <pgsql-sql@postgresql.org>
Subject: unused columns in copy
Date: Mon, 20 Jul 2009 06:22:49 -0700 (PDT)
Message-ID: <471945.42509.qm@web54306.mail.re2.yahoo.com> (raw)
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'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chestercyoung@yahoo.com
Subject: Re: unused columns in copy
In-Reply-To: <471945.42509.qm@web54306.mail.re2.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox