Re: psql -f COPY from STDIN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tarlika Elisabeth Schmitz <postgresql2(at)numerixtechnology(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: psql -f COPY from STDIN
Date: 2010-11-13 14:54:57
Message-ID: 24757.1289660097@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tarlika Elisabeth Schmitz <postgresql2(at)numerixtechnology(dot)de> writes:
> I changed event.sql (3 lines):
> \COPY
> (event_id, event_name)
> FROM STDIN DELIMITER AS ',' NULL AS ''

> Now I am getting error messages:
> psql:event.sql:1: \copy:parse error at end of line

I don't believe you can split backslash commands across lines.

> When I remove the linefeeds I don't get errors but it does not import
> anything.

You wanted pstdin, not stdin.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tarlika Elisabeth Schmitz 2010-11-13 15:04:02 Re: psql -f COPY from STDIN
Previous Message Tarlika Elisabeth Schmitz 2010-11-13 12:01:35 Re: psql -f COPY from STDIN