Re: COPY options - Mailing list pgsql-docs

From Tom Lane
Subject Re: COPY options
Date
Msg-id 16986.1461945038@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY options  ("Andrei M. Eichler" <andrei.eichler@unicheck.com.br>)
List pgsql-docs
"Andrei M. Eichler" <andrei.eichler@unicheck.com.br> writes:
> Following the documentation, I wrote this COPY FROM command:

> COPY test_copy FROM '/mnt/disk1/files/test_file.csv' with csv header
> delimiter ';' force_null date_column, date_column2, date_column3,
> date_column4, date_column5 encoding 'latin1';

Which part of the documentation, exactly, inspired you to write that?
Certainly not the main syntax summary for COPY, which would tell you
to write something like
    with (format csv, header, ...);

What you've got there is some variant of the pre-9.0 COPY syntax, which is
documented at the bottom of the COPY reference page, and hopefully not
used anywhere else.  FORCE_NULL isn't mentioned in that syntax, and
for that matter neither is FORCE NULL; if that works, it's accidental.

            regards, tom lane


pgsql-docs by date:

Previous
From: "Andrei M. Eichler"
Date:
Subject: Re: COPY options
Next
From: Kevin Grittner
Date:
Subject: Re: COPY options