Re: encoding confusion with \copy command

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Martin Waite <waite(dot)134(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: encoding confusion with \copy command
Date: 2014-09-18 01:08:04
Message-ID: 12479AF9-511E-413D-9575-304F9B8B5B86@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sep 17, 2014, at 11:52 AM, Martin Waite <waite(dot)134(at)gmail(dot)com> wrote:

> You are right that I need an intermediate step. I will probably use a CSV parser that is liberal in what it accepts, but writes out strict CSV data suitable for postgres.
>

If you find such a utility, please share. My clients love Excel, but it takes perfectly valid CSV files and makes them unreadable by Postgres. In particular, Excel saves rows with fewer columns than the header header row if the cells are empty. It also mangles valid UTF-8. I often take Excel CSV files and re-save them from Open Office to fix them for Postgres import.

John DeSoi, Ph.D.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2014-09-18 01:19:17 Re: Why isn't Java support part of Postgresql core?
Previous Message cowwoc 2014-09-18 00:02:51 Re: Why isn't Java support part of Postgresql core?