Re: using COPY table FROM STDIN within script run as psql

From: Kevin Murphy <murphy(at)genome(dot)chop(dot)edu>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: using COPY table FROM STDIN within script run as psql
Date: 2004-09-27 18:08:03
Message-ID: 2CDAAC96-10B0-11D9-9083-0003930D3626@genome.chop.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sep 27, 2004, at 1:53 PM, Tom Lane wrote:
> Kevin Murphy <murphy(at)genome(dot)chop(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shawn Chisholm 2004-09-27 19:19:47 Foreign key order evaluation
Previous Message Tom Lane 2004-09-27 17:53:35 Re: using COPY table FROM STDIN within script run as psql