Received: from dfw-ix11.ix.netcom.com (dfw-ix11.ix.netcom.com [206.214.98.11]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA57260 for ; Thu, 2 Sep 1999 05:51:01 -0400 (EDT) (envelope-from drfrog@smartt.com) Received: (from smap@localhost) by dfw-ix11.ix.netcom.com (8.8.4/8.8.4) id EAA15358; Thu, 2 Sep 1999 04:50:25 -0500 (CDT) Received: from 00-10-4b-66-ed-f1.bconnected.net(209.53.23.244) by dfw-ix11.ix.netcom.com via smap (V1.3) id rma015353; Thu Sep 2 04:50:19 1999 Sender: DrFrog@ix.netcom.com Message-ID: <37CE4A90.9831D625@smartt.com> Date: Thu, 02 Sep 1999 09:59:47 +0000 From: Clayton Cottingham X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.3.2 i586) X-Accept-Language: en MIME-Version: 1.0 To: Martin Neumann , "pgsql-sql@postgresql.org" Subject: Re: References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit martin: couple o things: use something like sed to pre process the file taking out the erronous data, if you know what the bad data is one thing i use sed for is html escape single quotes and the like, it should work well for you the regex for substituting like that is: s/old/new/g the sed command operates regexes with an -e switch : sed -e s/error/correction/g errorfile>correctedfile takes errorfile in and changes any occurence of 'error' to 'correction' and prints all data to correctedfile also if its a flat file you could just use the copy command in psql instead of inserts: \copy tablein from filename