pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: sfbarbee@gmail.com
Subject: FORMAT keyword not allowed in COPY ... FROM statement
Date: Fri, 22 Feb 2019 07:40:21 +0000
Message-ID: <155082122169.1372.13013704865070084381@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

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

> psql --version ;
psql (PostgreSQL) 11.2
> initdb --version ;
initdb (PostgreSQL) 11.2

# \h copy
Command:     COPY
Description: copy data between a file and a table
Syntax:
COPY table_name [ ( column_name [, ...] ) ]
    FROM { 'filename' | PROGRAM 'command' | STDIN }
    [ [ WITH ] ( option [, ...] ) ]

COPY { table_name [ ( column_name [, ...] ) ] | ( query ) }
    TO { 'filename' | PROGRAM 'command' | STDOUT }
    [ [ WITH ] ( option [, ...] ) ]

where option can be one of:

    FORMAT format_name
    OIDS [ boolean ]
    FREEZE [ boolean ]
    DELIMITER 'delimiter_character'
    NULL 'null_string'
    HEADER [ boolean ]
    QUOTE 'quote_character'
    ESCAPE 'escape_character'
    FORCE_QUOTE { ( column_name [, ...] ) | * }
    FORCE_NOT_NULL ( column_name [, ...] )
    FORCE_NULL ( column_name [, ...] )
    ENCODING 'encoding_name'

# COPY table_name FROM '/srv/database/pg_dumps/file.csv' WITH FORMAT CSV
HEADER DELIMITER ',' QUOTE '"' ;
ERROR:  syntax error at or near "FORMAT"

# COPY table_name FROM '/srv/database/pg_dumps/file.csv' WITH CSV HEADER
DELIMITER ',' QUOTE '"' ;
COPY 63


view thread (2+ messages)  latest in thread

Message-ID: <155082122169.1372.13013704865070084381@wrigleys.postgresql.org>
Permalink:  ../155082122169.1372.13013704865070084381@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/155082122169.1372.13013704865070084381@wrigleys.postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, sfbarbee@gmail.com
  Subject: Re: FORMAT keyword not allowed in COPY ... FROM statement
  In-Reply-To: <155082122169.1372.13013704865070084381@wrigleys.postgresql.org>

* 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