Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
The following command works fine when pasing it to psql via the -c

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

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

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group