COPY without quoting - Mailing list pgsql-sql

From Lee Hachadoorian
Subject COPY without quoting
Date
Msg-id 4F6215CE.7050207@gmail.com
Whole thread Raw
Responses Re: COPY without quoting
List pgsql-sql
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. But I am missing it if the COPY statement has a way to turn 
quotes off. You can turn them *on* with FORCE QUOTE, in which case a 
column will be quoted even if there are no embedded delimiters, etc. I 
tried

COPY ... TO ... WITH CSV QUOTE '';

but got a message that the quote string had to be at least one character.

Any ideas?

Best,
--Lee

-- 
Lee Hachadoorian
PhD, Earth&  Environmental Sciences (Geography)
Research Associate, CUNY Center for Urban Research
http://freecity.commons.gc.cuny.edu



pgsql-sql by date:

Previous
From: David Johnston
Date:
Subject: Re: help on a function with exception
Next
From: Tom Lane
Date:
Subject: Re: COPY without quoting