Re: COPY options

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrei M(dot) Eichler" <andrei(dot)eichler(at)unicheck(dot)com(dot)br>
Cc: Kevin Grittner <kgrittn(at)gmail(dot)com>, "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org>
Subject: Re: COPY options
Date: 2016-04-29 15:50:38
Message-ID: 16986.1461945038@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

"Andrei M. Eichler" <andrei(dot)eichler(at)unicheck(dot)com(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Kevin Grittner 2016-04-29 15:53:57 Re: COPY options
Previous Message Andrei M. Eichler 2016-04-29 15:31:37 Re: COPY options