suggestion: add explicit example for COPY of new-vs-old syntax

Поиск
Список
Период
Сортировка
От Assaf Gordon
Тема suggestion: add explicit example for COPY of new-vs-old syntax
Дата
Msg-id e38bee0a-9e94-b275-c404-45ce023382df@nygenome.org
обсуждение исходный текст
Список pgsql-docs
Hello,

I'd like to suggest the following small patch (attached),
to give explicit example for COPY of new-vs-old syntax at the top of the page.
===
Starting with PostgreSQL version 9.0, the
COPY commands supports new syntax with parenthesis
and commas. The old syntax is still supported, see details
at the bottom of this page.

New syntax:
   COPY country TO STDOUT (FORMAT CSV, NULL 'NA', HEADER ON);

Old syntax:
   COPY country TO STDOUT NULL 'NA' CSV HEADER;
===


The web is full of examples, but many of them are for the old syntax.
The COPY documentation page mentions this critical difference only in passing,
and requires careful reading of the entire page to spot the culprit of syntax errors.

A typical example is:
  https://www.postgresql.org/message-id/26320.1291391510%40sss.pgh.pa.us

I know examples usually go at the end of the page,
but I think in this case, a short example is worth at least 100 words :)

Comments (and rephrasing) are welcomed,
regards,
  - assaf


This electronic message is intended for the use of the named recipient only, and may contain information that is
confidential,privileged or protected from disclosure under applicable law. If you are not the intended recipient, or an
employeeor agent responsible for delivering this message to the intended recipient, you are hereby notified that any
reading,disclosure, dissemination, distribution, copying or use of the contents of this message including any of its
attachmentsis strictly prohibited. If you have received this message in error or are not the named recipient, please
notifyus immediately by contacting the sender at the electronic mail address noted above, and destroy all copies of
thismessage. Please note, the recipient should check this email and any attachments for the presence of viruses. The
organizationaccepts no liability for any damage caused by any virus transmitted by this email. 

Вложения

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

Предыдущее
От: napocoelho@gmail.com
Дата:
Сообщение: Translation to Portuguese
Следующее
От: atiris@gmail.com
Дата:
Сообщение: Default privileges not working