Re: BUG #16424: COPY Command fails for CSV formath - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #16424: COPY Command fails for CSV formath
Date
Msg-id CAKFQuwY7uCcmE7sxcP1G=TgpKEzNcvRbjOnEjf2Q0eQkan-SBQ@mail.gmail.com
Whole thread Raw
In response to BUG #16424: COPY Command fails for CSV formath  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Friday, May 8, 2020, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      16424
Logged by:          Vivek Kamath
Email address:      vivek4422@gmail.com
PostgreSQL version: 10.6
Operating system:   Linux Unix
Description:       

Hi,

I am copying a csv file where the fields are quoted with " and separated  by
,. 
I am using below syntax to copy data using below syntax

psql -c "COPY table_name from filename WITH (FORMAT csv)".

Replace that command with something that will handle the poorly structured csv data you are receiving.  COPY is very linear and unforgiving when it comes to accepting input so you need something that will feed copy that well-formed data it expects).

David J.

pgsql-bugs by date:

Previous
From: Fabio Pardi
Date:
Subject: Re: pg_dump
Next
From: PG Bug reporting form
Date:
Subject: BUG #16425: Possible error in full join