From: | Platon Pronko <platon7pronko(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | question about docs on copy command |
Date: | 2019-09-06 07:47:22 |
Message-ID: | a9269d14-3b87-32a2-71d4-80bb3c05540c@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi!
I'm having a little trouble with docs of COPY command: https://www.postgresql.org/docs/11/sql-copy.html
Excerpt from synopsis:
> COPY { table_name [ ( column_name [, ...] ) ] | ( query ) }
> TO { 'filename' | PROGRAM 'command' | STDOUT }
> [ [ WITH ] ( option [, ...] ) ]
>
> where option can be one of:
>
> FORMAT format_name
This led me to beleive that the following command should be valid:
copy (select 1) to stdout with format csv;
However, the error is shown:
> ERROR: syntax error at or near "format"
> LINE 1: copy (select 1) to stdout with format csv;
> ^
This command executes normally:
copy (select 1) to stdout with csv;
Am I missing something, or maybe the docs need a slight correction?
Best regards,
Platon Pronko
From | Date | Subject | |
---|---|---|---|
Next Message | David Raymond | 2019-09-06 13:15:22 | RE: question about docs on copy command |
Previous Message | Arni | 2019-09-06 07:15:00 | Re: Recommended Modeling Tools? |