Re: Query RE using COPY

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: "Paul Lambert" <paul(dot)lambert(at)autoledgers(dot)com(dot)au>
Cc: "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Query RE using COPY
Date: 2007-05-08 13:30:33
Message-ID: 36e682920705080630l421f3730o1098045ff5f901e7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 5/8/07, Paul Lambert <paul(dot)lambert(at)autoledgers(dot)com(dot)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(at)enterprisedb(dot)com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Reuven Abliyev 2007-05-08 14:00:25 Re: Needs Query
Previous Message A. Kretschmer 2007-05-08 12:58:54 Re: Needs Query