Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CCDBC9FBFED for ; Wed, 24 Oct 2007 04:02:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 03147-08 for ; Wed, 24 Oct 2007 04:02:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from k2smtpout05-02.prod.mesa1.secureserver.net (k2smtpout05-02.prod.mesa1.secureserver.net [64.202.189.57]) by postgresql.org (Postfix) with SMTP id 6FDF39FBFE2 for ; Wed, 24 Oct 2007 04:02:27 -0300 (ADT) Received: (qmail 21702 invoked from network); 24 Oct 2007 07:02:26 -0000 Received: from unknown (HELO mail.servantwebhosting.com) (68.178.159.82) by k2smtpout05-02.prod.mesa1.secureserver.net (64.202.189.57) with ESMTP; 24 Oct 2007 07:02:26 -0000 Received: (qmail 20341 invoked from network); 24 Oct 2007 00:02:25 -0700 Received: from s010600e0296eec95.mj.shawcable.net (HELO shach) (rob@nullmx.com@70.64.195.140) by mail.servantwebhosting.com with SMTP; 24 Oct 2007 00:02:25 -0700 From: "Chuck D." Reply-To: pgsql-list@nullmx.com To: "Fernando Hevia" , pgsql-sql@postgresql.org Subject: Re: request for help with COPY syntax Date: Wed, 24 Oct 2007 01:02:19 -0600 User-Agent: KMail/1.9.6 References: <02ab01c81594$07f63c20$8f01010a@iptel.com.ar> In-Reply-To: <02ab01c81594$07f63c20$8f01010a@iptel.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710240102.19224.pgsql-list@nullmx.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/100 X-Sequence-Number: 29472 On October 23, 2007 10:44:51 am you wrote: > Hi Chuck, > Do you need those characters in your table? If not I think you will be > better off preprocessing the data before running copy. > > Replacing those " for ' or directly removing them is quite simple if you > are working in Unix, actually it should be quite simple in any operating > system. > > Regards, > Fernando Greetings, I'm not sure if they are needed because I've never seen a double quote in a place name before. I don't believe they are errors though because there are more records that contain them. As well, some records have single and double quotes allowed within a record and this really messes things up. Any ideas? Should I consider removing them in favor of a single quote? If so, do you know how to do this with sed or similar?