psql -f COPY from STDIN - Mailing list pgsql-sql

From Tarlika Elisabeth Schmitz
Subject psql -f COPY from STDIN
Date
Msg-id 20101112220340.36a0bc75@dick.coachhouse
Whole thread Raw
Responses Re: psql -f COPY from STDIN
Re: psql -f COPY from STDIN
List 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


pgsql-sql by date:

Previous
From: "Ozer, Pam"
Date:
Subject: Re: Overlapping Ranges- Query Alternative
Next
From: Adrian Klaver
Date:
Subject: Re: psql -f COPY from STDIN