Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id CE0539FB491 for ; Tue, 8 May 2007 10:30:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 25733-07 for ; Tue, 8 May 2007 10:30:30 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by postgresql.org (Postfix) with ESMTP id 76BB69FB291 for ; Tue, 8 May 2007 10:30:35 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id s1so2072321nze for ; Tue, 08 May 2007 06:30:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZXYdQrYQN1figWZsDGXwyR1SolCjqITdU7B8kpHJw4Om0leHRKCjiCaho/egFTZHEuKapv17umMVG/KLWfrzkll+VKqsm2XJeEJ8vdovNUNnCpK1EzljCy9hzsuONaFMP2Hexcb1yOXPVKypUx3LA6LRXZyyLPa48IfioC7XMiI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Q6BGZI6z+/Kinur9/DZ0XHkmpF+TPAsFvrcGM8RMqvGbO7X5Updy5/xShwN8Zosvnx44z4U37C4vFrBrBDvBwYonYICjVX003gTir5zQRCXFb/t2SWHAdK4wJT5AH+DEz8Dl0bdgFYbYDWyIqxt2L2+/6uyH18+9mtnlaWrMY70= Received: by 10.115.78.1 with SMTP id f1mr656533wal.1178631033642; Tue, 08 May 2007 06:30:33 -0700 (PDT) Received: by 10.114.47.12 with HTTP; Tue, 8 May 2007 06:30:33 -0700 (PDT) Message-ID: <36e682920705080630l421f3730o1098045ff5f901e7@mail.gmail.com> Date: Tue, 8 May 2007 09:30:33 -0400 From: "Jonah H. Harris" To: "Paul Lambert" Subject: Re: Query RE using COPY Cc: "Phillip Smith" , pgsql-sql@postgresql.org In-Reply-To: <463FFAE9.1040403@autoledgers.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <003b01c79127$6b957ee0$9b0014ac@wbaus090> <463FFAE9.1040403@autoledgers.com.au> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/60 X-Sequence-Number: 28341 On 5/8/07, Paul Lambert 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/