Re: using COPY table FROM STDIN within script run as psql - Mailing list pgsql-general

From Kevin Murphy
Subject Re: using COPY table FROM STDIN within script run as psql
Date
Msg-id 2CDAAC96-10B0-11D9-9083-0003930D3626@genome.chop.edu
Whole thread Raw
In response to Re: using COPY table FROM STDIN within script run as psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sep 27, 2004, at 1:53 PM, Tom Lane wrote:
> Kevin Murphy <murphy@genome.chop.edu> writes:
>> psql -U egenome_test -P pager=off -f
>> /Users/murphy/cvs/egora/sql/data_build/junk.sql < ./junk.dat
>> COPY import_sts_tmp FROM STDIN WITH NULL AS '';
> This command says to copy from the SQL script file.  You can use
> psql's \copy command to get the effect you are after.

Yes, I discovered that \COPY worked.  Ah, so the COPY starts consuming
its own script -- on the line after the COPY command?  Maybe that is
why an error is given about the second column, then: the first column
consumes emptiness from the following blank line, leaving no data
source for the remaining columns of the first row?

-Kevin Murphy


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: using COPY table FROM STDIN within script run as psql
Next
From: "Shawn Chisholm"
Date:
Subject: Foreign key order evaluation