Re: COPY without quoting - Mailing list pgsql-sql

From Tom Lane
Subject Re: COPY without quoting
Date
Msg-id 21644.1331828614@sss.pgh.pa.us
Whole thread Raw
In response to COPY without quoting  (Lee Hachadoorian <lee.hachadoorian@gmail.com>)
Responses Re: COPY without quoting  (Lee Hachadoorian <lee.hachadoorian@gmail.com>)
List pgsql-sql
Lee Hachadoorian <lee.hachadoorian@gmail.com> writes:
> COPY ... TO ... WITH CSV defaults to quoting string fields with embedded 
> delimiters, quotes, and newlines. In pgAdmin I can execute to file and 
> specify "no quoting" for the output, in which case I get (what I want) a 
> file with no quotes, even though there are embedded commas in the 
> strings.

Uh ... why exactly would you want that?  It seems impossible to parse
such a file.

If what you want is an unparsable file, you could just strip out the
quotes with "sed" after the fact.  But COPY is not in the business of
producing non-machine-readable files, so the fact that it doesn't have
an option for this doesn't bother me.
        regards, tom lane


pgsql-sql by date:

Previous
From: Lee Hachadoorian
Date:
Subject: COPY without quoting
Next
From: Lee Hachadoorian
Date:
Subject: Re: COPY without quoting