X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E6142528C6 for ; Thu, 23 Jun 2005 16:27:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13336-09 for ; Thu, 23 Jun 2005 19:27:50 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by svr1.postgresql.org (Postfix) with ESMTP id 999C452882 for ; Thu, 23 Jun 2005 16:27:49 -0300 (ADT) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0IIJ00M01Y28B8@asu.edu> for pgsql-admin@postgresql.org; Thu, 23 Jun 2005 12:27:44 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) by asu.edu (PMDF V6.1-1X6 #30769) with ESMTP id <0IIJ00JCSY28IQ@asu.edu> for pgsql-admin@postgresql.org; Thu, 23 Jun 2005 12:27:44 -0700 (MST) Received: from teancum.pp.asu.edu (teancum.pp.asu.edu [129.219.69.212]) by smtp.asu.edu (8.12.10/8.12.10/asu_smtp_relay, nullclient, tcp_wrapped) with ESMTP id j5NJRij5029688 for ; Thu, 23 Jun 2005 12:27:44 -0700 (MST) Received: by teancum.pp.asu.edu (Postfix, from userid 1000) id BF68B724; Thu, 23 Jun 2005 12:27:44 -0700 (MST) Date: Thu, 23 Jun 2005 12:27:44 -0700 From: David Bear Subject: psql copy errors To: pgsql-admin@postgresql.org Reply-To: David.Bear@asu.edu Message-id: <20050623192744.GC398@asu.edu> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.28 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200506/177 X-Sequence-Number: 17932 I'm finding the \copy is very brittle. It seems to stop for everyone little reason. Is there a way to tell it to be more forgiving -- for example, to ignore extra data fields that might exists on a line? Or, to have it just skip that offending record but continue on to the next. I've got a tab delimited file, but if \copy sees any extra tabs in the file it just stops at that record. I want to be able to control what pg does when it hits an exception. I'm curious what others do for bulk data migration. Since copy seems so brittle, there must be a better way... -- David Bear phone: 480-965-8257 fax: 480-965-9189 College of Public Programs/ASU Wilson Hall 232 Tempe, AZ 85287-0803 "Beware the IP portfolio, everyone will be suspect of trespassing"