psql -f COPY from STDIN

From: Tarlika Elisabeth Schmitz <postgresql2(at)numerixtechnology(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: psql -f COPY from STDIN
Date: 2010-11-12 22:03:40
Message-ID: 20101112220340.36a0bc75@dick.coachhouse
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

The following command works fine when pasing it to psql via the -c
option:

cat event.csv | \
psql -c "COPY (event_id, event_name) FROM STDIN DELIMITER AS ',' NULL
AS ''"

When executed from a file via -f, it does nothing (no error messages
either):

event.sql:
COPY (event_id, event_name) FROM STDIN DELIMITER AS ',' NULL AS ''

cat event.csv | psql -f event.sql

What's the problem? Many thanks in advance.

--

Best Regards,
Tarlika Elisabeth Schmitz

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Adrian Klaver 2010-11-12 23:17:59 Re: psql -f COPY from STDIN
Previous Message Ozer, Pam 2010-11-12 16:36:13 Re: Overlapping Ranges- Query Alternative