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 1kuLza-0004vN-J9 for pgsql-general@arkaria.postgresql.org; Tue, 29 Dec 2020 20:53:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kuLzZ-0004Yc-I7 for pgsql-general@arkaria.postgresql.org; Tue, 29 Dec 2020 20:53:17 +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 1kuLzZ-0004YV-AR for pgsql-general@lists.postgresql.org; Tue, 29 Dec 2020 20:53:17 +0000 Received: from 024-182-127-154.biz.spectrum.com ([24.182.127.154] helo=mail.brookhurstdata.net) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kuLzU-0000m8-47 for pgsql-general@lists.postgresql.org; Tue, 29 Dec 2020 20:53:16 +0000 Received: from mail.brookhurstdata.net (mail.brookhurstdata.net [10.1.5.12]) by mail.brookhurstdata.net (Postfix) with ESMTP id 337B588901D for ; Tue, 29 Dec 2020 14:53:10 -0600 (CST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 29 Dec 2020 14:53:09 -0600 From: Susan Hurst To: pgsql-general@lists.postgresql.org Subject: Re: copy command - something not found Organization: Brookhurst Data LLC Reply-To: susan.hurst@brookhurstdata.com Mail-Reply-To: susan.hurst@brookhurstdata.com Message-ID: <8a390a7b2e845d38e0a2413966cb5b93@mail.brookhurstdata.net> X-Sender: susan.hurst@brookhurstdata.com User-Agent: Roundcube Webmail/RCMAIL_VERSION List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom...I think you are right about feeding the contents of the csv file to the shell instead of psql. After drilling down a bit more into my script, I now think I have a UNIX shell script problem rather than a psql problem. I do appreciate everyone's input as it has been most helpful in my efforts to figure out what is not the problem. Thanks for your help! Sue --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hurst@brookhurstdata.com Mobile: 314-486-3261 On 2020-12-29 13:55, Tom Lane wrote: > 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