Обсуждение: documentation for SQL "COPY" says "FORMAT"

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

documentation for SQL "COPY" says "FORMAT"

От
randumbloggr@gmail.com
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.0/static/sql-copy.html
Description:

the documentation for the copy command (since version 9.0)  says to use the
keyword "FORMAT" , this keyword should be omitted (eg: say "CSV" instead of
"FORMAT CSV") . It also says the default is "text" but specifying "text" is
a syntax error.

Re: documentation for SQL "COPY" says "FORMAT"

От
"David G. Johnston"
Дата:
On Tue, Dec 5, 2017 at 5:01 PM, <randumbloggr@gmail.com> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.0/static/sql-copy.html
Description:

the documentation for the copy command (since version 9.0)  says to use the
keyword &quot;FORMAT&quot; , this keyword should be omitted (eg: say &quot;CSV&quot; instead of
&quot;FORMAT CSV&quot;) . It also says the default is &quot;text&quot; but specifying &quot;text&quot; is
a syntax error.


I'm pretty sure the docs are correct.  You should provide the exact commands you think should work and the error message you receive when you execute said commands.

David J.


Re: documentation for SQL "COPY" says "FORMAT"

От
Tom Lane
Дата:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tue, Dec 5, 2017 at 5:01 PM, <randumbloggr@gmail.com> wrote:
>> the documentation for the copy command (since version 9.0)  says to use the
>> keyword "FORMAT" , this keyword should be omitted

> I'm pretty sure the docs are correct.  You should provide the exact
> commands you think should work and the error message you receive when you
> execute said commands.

I think probably the OP is confusing the current COPY syntax with the
obsolete form documented at the bottom of the COPY page.

            regards, tom lane