Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntz0S-00019v-38 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 May 2022 21:57:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntz0P-0001t2-1n for pgsql-bugs@arkaria.postgresql.org; Wed, 25 May 2022 21:57:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntz0O-0001na-PQ for pgsql-bugs@lists.postgresql.org; Wed, 25 May 2022 21:57:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntz0J-0003me-KM for pgsql-bugs@lists.postgresql.org; Wed, 25 May 2022 21:57:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24PLvIcC2019392; Wed, 25 May 2022 17:57:18 -0400 From: Tom Lane To: jam paydavousi cc: "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: <569491626.1695111.1653513632963@mail.yahoo.com> References: <17498-7b8108cfd105f161@postgresql.org> <1999259.1653509169@sss.pgh.pa.us> <569491626.1695111.1653513632963@mail.yahoo.com> Comments: In-reply-to jam paydavousi message dated "Wed, 25 May 2022 21:20:32 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2019390.1653515838.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 25 May 2022 17:57:18 -0400 Message-ID: <2019391.1653515838@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk jam paydavousi writes: > Thank you for following up Tom. =C2=A0I 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 he= ader; > 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