Bug In COPY TO?

Started by Bill Thoenover 17 years ago2 messagesgeneral
Jump to latest
#1Bill Thoen
bthoen@gisnet.com

I noticed that in PG 8.1 the docs for COPY TO say that you can use WITH
HEADER, but when I do that it throws an error saying that this works
only in CSV mode. Is this a bug or do I have something wrong with my syntax?

COPY mytable TO '/data/out.txt'
WITH HEADER DELIMITER '|' NULL '' ;

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bill Thoen (#1)
Re: Bug In COPY TO?

Bill Thoen <bthoen@gisnet.com> writes:

I noticed that in PG 8.1 the docs for COPY TO say that you can use WITH
HEADER, but when I do that it throws an error saying that this works
only in CSV mode. Is this a bug or do I have something wrong with my syntax?

I'd say it's a bug in the documentation :-(. It looks like someone
carelessly added HEADER in the wrong place in the syntax summary.

regards, tom lane