Re: ERROR: extra data after last expected column - Mailing list pgsql-general

From Ron
Subject Re: ERROR: extra data after last expected column
Date
Msg-id 1ed6d66d-0caa-36bb-21f5-df39adaa26e4@gmail.com
Whole thread Raw
In response to Re: ERROR: extra data after last expected column  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
On 3/7/22 17:57, Rob Sargent wrote:
On 3/7/22 16:48, scott macri wrote:
[snip]

It pukes after the 9th column every time no matter what I change.

COPY option_details(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y)
FROM '/home/dump/my_csv.csv' WITH (FORMAT CSV, DELIMITER '|', ENCODING
'UTF8');

You've verified the encoding is UTF8?

Row one data in file is below:
item a | item b | item c | item d | item e | item f | item g | item h |
item i | item j | item k | item l | item m | item n | item o | item p |
item q | item r | item s | item t | item u | item v | item w | item x |
item y
--- Line two would normally start here but no reason to show since it's
failing above. ---

I get the following error:
ERROR:  extra data after last expected column
CONTEXT:  COPY option_details, line 1: "item a|item b|item c|item
d|item e|item f|item g|item h|item i|..."

Might there be pipe characters in one of the columns?


--
Angular momentum makes the world go 'round.

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: ERROR: extra data after last expected column
Next
From: BeginnerC
Date:
Subject: A simple question: Why 'pg_ctl: command not found...' ?