CSV options in COPY

Started by hjenkinsabout 18 years ago2 messagesgeneral
Jump to latest
#1hjenkins
hjenkins@uvic.ca

Hello, all,

On the subject of the COPY command
(http://www.postgresql.org/docs/current/interactive/sql-copy.html), is it
the case that the HEADER, QUOTE, escape, FORCE QUOTE, and FORCE NOT NULL
options can only be used in CSV mode? If so, why? A tab-delimited table
with a header line and quoted strings seems a perfectly reasonable format.
If not, how?

Regards,
Hazel Jenkins

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: hjenkins (#1)
Re: CSV options in COPY

"hjenkins" <hjenkins@uvic.ca> writes:

On the subject of the COPY command
(http://www.postgresql.org/docs/current/interactive/sql-copy.html), is it
the case that the HEADER, QUOTE, escape, FORCE QUOTE, and FORCE NOT NULL
options can only be used in CSV mode? If so, why? A tab-delimited table
with a header line and quoted strings seems a perfectly reasonable format.
If not, how?

So set the CSV delimiter to TAB, if that's what you want.

regards, tom lane