Re: BUG #5964: doc bug -- copy does not take "format" literal

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5964: doc bug -- copy does not take "format" literal
Дата
Msg-id 15252.1301849209@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5964: doc bug -- copy does not take "format" literal  ("Chris Curvey" <chris@chriscurvey.com>)
Список pgsql-bugs
"Chris Curvey" <chris@chriscurvey.com> writes:
> in http://www.postgresql.org/docs/9.0/static/sql-copy.html, the
> documentation implies that you specify a format using the literal "format",
> followed by one of the literals "text", "csv" or "binary".

Quite.

> Yet the following statement fails with "syntax error near 'format'"

> copy zipcode_stage from '/path/to/zip_codes.csv' format csv header delimiter
> e'\t';

That is the old-style syntax, which doesn't allow newer options such as
FORMAT.  Use

copy zipcode_stage from '/path/to/zip_codes.csv' (format csv, header, delimiter e'\t');

If you can make any concrete suggestions about how to make the docs
clearer about this, please do.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Chris Curvey"
Дата:
Сообщение: BUG #5964: doc bug -- copy does not take "format" literal
Следующее
От: "Jan-Erik Lärka"
Дата:
Сообщение: Non Win/*nix UTF-8 codepage not known to PostgreSQL developers?!