pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jam paydavousi <jampaydavousi@yahoo.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17498: Receive Failed: (error code 1) when importing any csv file from pgAdmin with no explanations
Date: Wed, 25 May 2022 17:57:18 -0400
Message-ID: <2019391.1653515838@sss.pgh.pa.us> (raw)
In-Reply-To: <569491626.1695111.1653513632963@mail.yahoo.com>
References: <17498-7b8108cfd105f161@postgresql.org>
	<1999259.1653509169@sss.pgh.pa.us>
	<569491626.1695111.1653513632963@mail.yahoo.com>

jam paydavousi <jampaydavousi@yahoo.com> writes:
>  Thank you for following up Tom.  I did what you instructed- i.e., filing distinctly from pgAdmin link you provided.
> However, I have the same issue when I attempt to import the csv file via the command line interface on mac terminal. It copies 0 rows

> postgres-# \copy alove from '/Users/jam/alovel.csv' delimiter ',' csv header;

> COPY 0

Hm.  Sure looks like Postgres thinks the file is empty.

That "CSV HEADER" option would silently eat the first line, so I'm
wondering if the data looks like it's a single line to COPY,
ie maybe there is something funny about the newlines in your file.
You could check this theory easily by leaving off "CSV HEADER"
and seeing if the results change.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <2019391.1653515838@sss.pgh.pa.us>
Permalink:  ../2019391.1653515838@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2019391.1653515838@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jampaydavousi@yahoo.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17498: Receive Failed: (error code 1) when importing any csv file from pgAdmin with no explanations
  In-Reply-To: <2019391.1653515838@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox