pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Kerr <andrew.kerr@unrulymedia.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #6254: COPY ... TO .. CSV sometimes doesn't escape strings
Date: Thu, 13 Oct 2011 16:28:15 GMT
Message-ID: <201110131628.p9DGSFFf007210@wwwmaster.postgresql.org> (raw)


The following bug has been logged online:

Bug reference:      6254
Logged by:          Andrew Kerr
Email address:      andrew.kerr@unrulymedia.com
PostgreSQL version: 9.0.5
Operating system:   CentOS 5.4
Description:        COPY ... TO .. CSV sometimes doesn't escape strings
Details: 

Query of this form:

copy (select 
 col1,col2
from mytable)
 to 'output.csv' with (format csv, force_quote *);

where some selected columns are text sometimes fails to escape quotes (with
another quote) in text.

On which rows this happens varies with different runs.

Sometimes a field will have some quotes escaped and some not.

Running on a 90 million row table.



view thread (2+ messages)  latest in thread

Message-ID: <201110131628.p9DGSFFf007210@wwwmaster.postgresql.org>
Permalink:  ../201110131628.p9DGSFFf007210@wwwmaster.postgresql.org/
Also on:    postgresql.org/message-id/201110131628.p9DGSFFf007210@wwwmaster.postgresql.org

 · 

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: andrew.kerr@unrulymedia.com
  Subject: Re: BUG #6254: COPY ... TO .. CSV sometimes doesn't escape strings
  In-Reply-To: <201110131628.p9DGSFFf007210@wwwmaster.postgresql.org>
  References: <201110131628.p9DGSFFf007210@wwwmaster.postgresql.org>

* 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