pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: TAKATSUKA Haruka <harukat@sra.co.jp>
To: matsusaka@sraoss.co.jp
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7518: "FORMAT" in the "COPY" command
Date: Tue, 4 Sep 2012 18:13:24 +0900
Message-ID: <20120904181324.b269908b.harukat@sra.co.jp> (raw)
In-Reply-To: <E1T8p1Q-00009N-5V@wrigleys.postgresql.org>
References: <E1T8p1Q-00009N-5V@wrigleys.postgresql.org>

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





view thread (2+ messages)

Message-ID: <20120904181324.b269908b.harukat@sra.co.jp>
Permalink:  ../20120904181324.b269908b.harukat@sra.co.jp/
Also on:    postgresql.org/message-id/20120904181324.b269908b.harukat@sra.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: harukat@sra.co.jp, matsusaka@sraoss.co.jp
  Subject: Re: BUG #7518: "FORMAT" in the "COPY" command
  In-Reply-To: <20120904181324.b269908b.harukat@sra.co.jp>
  References: <E1T8p1Q-00009N-5V@wrigleys.postgresql.org> <20120904181324.b269908b.harukat@sra.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox