Re: Documentation problem: The syntax for "\copy" is just wrong

Поиск
Список
Период
Сортировка
От Pedro Gimeno
Тема Re: Documentation problem: The syntax for "\copy" is just wrong
Дата
Msg-id 53C691DC.3020002@personal.formauri.es
обсуждение исходный текст
Ответ на Documentation problem: The syntax for "\copy" is just wrong  (David Tonhofer <bughunt@gluino.name>)
Список pgsql-bugs
David Tonhofer wrote, On 2014-07-14 20:50:
> At
>
>
> http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-META-COMMANDS-COPY
>
> the syntax for the \copy command is given as follows:
>
>    \copy { table [ ( column_list ) ] | ( query ) } { from | to } {
> 'filename' | program 'command' | stdin | stdout | pstdin | pstdout } [ [
> with ] ( option [, ...] ) ]
>
> [...]
>
> According to the description as given, the following should work.
>
>    \copy table_to_fill from 'foofile.csv' with format csv, header true,
> delimiter ',';

This seems to be frequently reported. Can the parentheses be made more
prominent, e.g. by boldfacing them or putting them in quotes? They are
fairly easy to miss, because of the metacharacters [ ] { } interspersed
and the use of different conventions in different grammar specifications.

Alternatively, perhaps mention the parentheses explicitly in the text?

To the OP, this should work:

  \copy table_to_fill from 'foofile.csv' with (format csv, header true,
delimiter ',');

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

Предыдущее
От: arthur.j.odwyer@gmail.com
Дата:
Сообщение: BUG #10976: Two memory leaks in regcomp cleanup
Следующее
От: Noah Misch
Дата:
Сообщение: Re: PostgreSQL 6.2.5 Visual Studio Build does not pass the regression tests.