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 1kuL62-0003TL-US for pgsql-general@arkaria.postgresql.org; Tue, 29 Dec 2020 19:55:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kuL60-0008KU-GB for pgsql-general@arkaria.postgresql.org; Tue, 29 Dec 2020 19:55:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kuL60-0008KN-8Y for pgsql-general@lists.postgresql.org; Tue, 29 Dec 2020 19:55:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kuL5t-0000Af-Dp for pgsql-general@lists.postgresql.org; Tue, 29 Dec 2020 19:55:51 +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 0BTJteBE2193304; Tue, 29 Dec 2020 14:55:40 -0500 From: Tom Lane To: susan.hurst@brookhurstdata.com cc: Discuss List Postgres Subject: Re: copy command - something not found In-reply-to: <97194eb185caab667101ca543b28df00@mail.brookhurstdata.net> References: <97194eb185caab667101ca543b28df00@mail.brookhurstdata.net> Comments: In-reply-to Susan Hurst message dated "Tue, 29 Dec 2020 13:12:47 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2193302.1609271740.1@sss.pgh.pa.us> Date: Tue, 29 Dec 2020 14:55:40 -0500 Message-ID: <2193303.1609271740@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Susan Hurst writes: > ##-- output from terminal window > /home/dbzone/stp/rfc_db/RFC-00001/RFC-00001_copy_bar_active.csv: > schema_name,table_name,table_alias: not found > /home/dbzone/stp/rfc_db/RFC-00001/RFC-00001_copy_bar_active.csv: > chief,source_systems,ssys: not found > /home/dbzone/stp/rfc_db/RFC-00001/RFC-00001_copy_bar_active.csv: > chief,lookup_categories,lcat: not found > /home/dbzone/stp/rfc_db/RFC-00001/RFC-00001_copy_bar_active.csv: > chief,lookup_data,ldat: not found I'd say you're feeding the contents of the csv file to the Unix shell, not to psql. It's not real clear how that would happen given what you show as your initial shell command, but maybe ${CSVPATH} contains something odd? Also, as David noted, "-c" without any argument certainly isn't right. regards, tom lane