Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T8pCT-0005uS-L3 for pgsql-bugs@postgresql.org; Tue, 04 Sep 2012 09:13:37 +0000 Received: from sraihb2.sra.co.jp ([202.32.10.6]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T8pCO-0002kd-Gd for pgsql-bugs@postgresql.org; Tue, 04 Sep 2012 09:13:36 +0000 Received: from srascc.sra.co.jp (srascc [133.137.8.66]) by sraihb2.sra.co.jp (Postfix) with SMTP id EBFDF2A1628 for ; Tue, 4 Sep 2012 18:13:29 +0900 (JST) Received: from (srascb.sra.co.jp [133.137.8.65]) by srascc.sra.co.jp with smtp id 4590_06ea_cae7ada0_f670_11e1_b5dd_001d096c60d0; Tue, 04 Sep 2012 18:13:29 +0900 Received: from sranhm.sra.co.jp (sranhm [133.137.176.64]) by srascb.sra.co.jp (Postfix) with ESMTP id D1E08110C72 for ; Tue, 4 Sep 2012 18:13:29 +0900 (JST) Received: from harukat-pc (dhcp-177-118.sra.co.jp [133.137.177.118]) by sranhm.sra.co.jp (Postfix) with SMTP id BD3D658026; Tue, 4 Sep 2012 18:13:29 +0900 (JST) Date: Tue, 4 Sep 2012 18:13:24 +0900 From: TAKATSUKA Haruka To: matsusaka@sraoss.co.jp Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7518: "FORMAT" in the "COPY" command Message-Id: <20120904181324.b269908b.harukat@sra.co.jp> In-Reply-To: References: Organization: SRA OSS,Inc. X-Mailer: Sylpheed Pro 2.1.2 (GTK+ 2.10.14; i686-pc-mingw32; Pro 2.1.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201209/19 X-Sequence-Number: 34014 Hi, It's not bug. > postgres=# COPY table_name TO '/tmp/out.csv' FORMAT 'CSV'; This should be the following. COPY table_name TO '/tmp/out.csv' (FORMAT 'CSV') On Tue, 04 Sep 2012 09:02:12 +0000 matsusaka@sraoss.co.jp wrote: > The following bug has been logged on the website: > > Bug reference: 7518 > Logged by: Daichi Matsusaka > Email address: matsusaka@sraoss.co.jp > PostgreSQL version: 9.1.5 > Operating system: (Centos5) > Description: > > Hi, > > I think manual "COPY" command to be in the wrong. > > postgres=# COPY table_name TO '/tmp/out.csv' CSV; > COPY 1 > > postgres=# COPY table_name TO '/tmp/out.csv' FORMAT 'CSV'; > ERROR: syntax error at or near "FORMAT" > LINE 1: COPY table_name TO '/tmp/out.csv' FORMAT CSV; > > But, help is... > >  postgres=# \h COPY > : > : > COPY { table_name [ ( column [, ...] ) ] | ( query ) } > TO { 'filename' | STDOUT } > [ [ WITH ] ( option [, ...] ) ] > > where option can be one of: > > FORMAT format_name -- Is here. > OIDS [ boolean ] > DELIMITER 'delimiter_character' > : > > Is the same manual. > http://www.postgresql.org/docs/9.2/static/sql-copy.html > > > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs --------------------------------------- TAKATSUKA Haruka / harukat@sraoss.co.jp