COPY FROM needs better example - Mailing list pgsql-docs

From PG Doc comments form
Subject COPY FROM needs better example
Date
Msg-id 157427250984.7229.11070726402485602790@wrigleys.postgresql.org
Whole thread Raw
List pgsql-docs
The following documentation comment has been logged on the website:

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

The example shown for COPY FROM is very basic and doesn't show how to use
any of the options -- which have tricky syntax that seems to trip up a
number of people.

Some suggestions:

COPY my_table FROM my_table.csv WITH (FORMAT csv, ESCAPE '\', HEADER,
ENCODING win1251);
COPY tbl (id, color) FROM STDIN WITH (FORMAT text, ENCODING utf8, DELIMITER
'|', FREEZE);
1|Brown
2|Purple
3|Maroon

Thanks,
--Joe

pgsql-docs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Odd markup in SSL mode table
Next
From: Tatsuo Ishii
Date:
Subject: standalone-install.xml