Обсуждение: CSV options in COPY

Поиск
Список
Период
Сортировка

CSV options in COPY

От
"hjenkins"
Дата:
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



Re: CSV options in COPY

От
Tom Lane
Дата:
"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