X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 208EC9FC90D for ; Mon, 28 Aug 2006 01:14:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 11666-03 for ; Mon, 28 Aug 2006 01:14:39 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by postgresql.org (Postfix) with ESMTP id C5B9F9FC901 for ; Mon, 28 Aug 2006 01:14:38 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d80so2269222pyd for ; Sun, 27 Aug 2006 21:14:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=HezHx4VNCCwMpnMYiHA4nkQQDApUXc0K9xkPPjqgmGRJ0irUhGbgn86o81ltUvnf/FQciNWgCVraKxF0CbBzcRImOoi67st78RQ7VpUUFWeQtVYvaSGz4XuVQS/NZQ4fLg3TZCdyIjnTaj0EhgGIztbhjU57565qyppqM4y1fQ4= Received: by 10.35.9.15 with SMTP id m15mr11475685pyi; Sun, 27 Aug 2006 21:14:37 -0700 (PDT) Received: by 10.35.80.9 with HTTP; Sun, 27 Aug 2006 21:14:37 -0700 (PDT) Message-ID: Date: Sun, 27 Aug 2006 23:14:37 -0500 From: "Aaron Bono" To: Sumeet Subject: Re: Importing data from csv Cc: pgsql-sql@postgresql.org In-Reply-To: <7539aebb0608240747j6da083b2i3e1f380124504955@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_212758_2526656.1156738477758" References: <7539aebb0608240747j6da083b2i3e1f380124504955@mail.gmail.com> X-Google-Sender-Auth: 4379ce84795acdf2 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.59 tagged_above=0 required=5 tests=AWL, HTML_30_40, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/210 X-Sequence-Number: 26168 ------=_Part_212758_2526656.1156738477758 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/24/06, Sumeet wrote: > > Hi Folks, > > sorry if this is a duplicate post, i've been tryin to find a solution of > importing data into postgres from a csv file. The problem is, I have a > database which consists of columns which contain newline characters (mac and > unix). now when i export these files to a csv format, there are some line > breaks (mixed unix and mac) in the data which breaks the copy procedure. > Sounds like you are checking the file in as binary when it should be checked in as ASCII. You may want to consider changing that in your repository so this does not continue to be an issue. ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_212758_2526656.1156738477758 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/24/06, Sumeet <asumeet@gmail.com> wrote:
Hi Folks,

sorry if this is a duplicate post, i've been tryin to find a solution of importing data into postgres from a csv file. The problem is, I have a database which consists of columns which contain newline characters (mac and unix). now when i export these files to a csv format, there are some line breaks (mixed unix and mac) in the data which breaks the copy procedure.

 
Sounds like you are checking the file in as binary when it should be checked in as ASCII.  You may want to consider changing that in your repository so this does not continue to be an issue.

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
================================================================== ------=_Part_212758_2526656.1156738477758--