pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Susan Hurst <susan.hurst@brookhurstdata.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: copy command - something not found
Date: Tue, 29 Dec 2020 14:53:09 -0600
Message-ID: <8a390a7b2e845d38e0a2413966cb5b93@mail.brookhurstdata.net> (raw)

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 <susan.hurst@brookhurstdata.com> 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





view thread (11+ messages)

Message-ID: <8a390a7b2e845d38e0a2413966cb5b93@mail.brookhurstdata.net>
Permalink:  ../8a390a7b2e845d38e0a2413966cb5b93@mail.brookhurstdata.net/
Also on:    postgresql.org/message-id/8a390a7b2e845d38e0a2413966cb5b93@mail.brookhurstdata.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: susan.hurst@brookhurstdata.com
  Subject: Re: copy command - something not found
  In-Reply-To: <8a390a7b2e845d38e0a2413966cb5b93@mail.brookhurstdata.net>
  References: <8a390a7b2e845d38e0a2413966cb5b93@mail.brookhurstdata.net>

* 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