Re: copy command - something not found - Mailing list pgsql-general

From Tom Lane
Subject Re: copy command - something not found
Date
Msg-id 2193303.1609271740@sss.pgh.pa.us
Whole thread Raw
In response to copy command - something not found  (Susan Hurst <susan.hurst@brookhurstdata.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Dynamic procedure execution
Next
From: Susan Hurst
Date:
Subject: Re: copy command - something not found