pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #14251: COPY CSV: missing data for column that shouldn't be
Date: Thu, 14 Jul 2016 23:12:26 -0700
Message-ID: <81b92ba9-0ef8-3b24-7c6c-6fca17c92655@hogranch.com> (raw)
In-Reply-To: <20160715020334.1425.78931@wrigleys.postgresql.org>
References: <20160715020334.1425.78931@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 7/14/2016 7:03 PM, mickael.kerjean@gmail.com wrote:
> "af,dekh"iykh'ya,Dekh"iykh'ya,13,,34.60345,69.2405"
> => The csv is valid but postgres doesn't really get it right

the quotes don't make much sense at all.

     country_code = "af
     city = dekh"iykh'ya
     city_accent = Dekh"iykh'ya
     region = 13
     population = NULL
     lat = 34.60345
     lng = 69.2405"



is dekh"iykh'ya  supposed to be accented characters or something?  If 
you don't specify a QUOTE on your COPY command, it defaults to ", this 
will definitely mess things up.   you might try specifying a QUOTE '%' 
or something that doesn't exist in your data, I don't think you can 
disable QUOTE entirely on CSV format copies.

-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)  latest in thread

Message-ID: <81b92ba9-0ef8-3b24-7c6c-6fca17c92655@hogranch.com>
Permalink:  ../81b92ba9-0ef8-3b24-7c6c-6fca17c92655@hogranch.com/
Also on:    postgresql.org/message-id/81b92ba9-0ef8-3b24-7c6c-6fca17c92655@hogranch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pierce@hogranch.com
  Subject: Re: BUG #14251: COPY CSV: missing data for column that shouldn't be
  In-Reply-To: <81b92ba9-0ef8-3b24-7c6c-6fca17c92655@hogranch.com>
  References: <20160715020334.1425.78931@wrigleys.postgresql.org> <81b92ba9-0ef8-3b24-7c6c-6fca17c92655@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox