On 11/12/2010 02:03 PM, Tarlika Elisabeth Schmitz wrote:
> 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 ''
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.
>
--
Adrian Klaver
adrian.klaver@gmail.com