From: Jonah H. Harris <jonah.harris@gmail.com>
To: Paul Lambert <paul.lambert@autoledgers.com.au>
Cc: Phillip Smith <phillip.smith@weatherbeeta.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Query RE using COPY
Date: Tue, 8 May 2007 09:30:33 -0400
Message-ID: <36e682920705080630l421f3730o1098045ff5f901e7@mail.gmail.com> (raw)
In-Reply-To: <463FFAE9.1040403@autoledgers.com.au>
References: <003b01c79127$6b957ee0$9b0014ac@wbaus090>
<463FFAE9.1040403@autoledgers.com.au>
On 5/8/07, Paul Lambert <paul.lambert@autoledgers.com.au> wrote:
> Right now the software that does the extracts is developed by our
> applications developers, but I'll be taking that onto my side in the
> near future, just looking for a workaround until then.
Sorry, but there isn't one. An unqualified COPY expects all columns
and the syntax I gave you is the only way to limit the columns for
insertion.
You could write your own server-side function to parse, split, and
insert the data, but it would be slower than COPY. Likely, the
easiest thing would be to change your company's software.
--
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 3rd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
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: jonah.harris@gmail.com, paul.lambert@autoledgers.com.au, phillip.smith@weatherbeeta.com.au
Subject: Re: Query RE using COPY
In-Reply-To: <36e682920705080630l421f3730o1098045ff5f901e7@mail.gmail.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