From: Adrian Klaver <adrian.klaver@gmail.com>
To: Tarlika Elisabeth Schmitz <postgresql2@numerixtechnology.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: psql -f COPY from STDIN
Date: Fri, 12 Nov 2010 15:17:59 -0800
Message-ID: <4CDDCB27.9000004@gmail.com> (raw)
In-Reply-To: <20101112220340.36a0bc75@dick.coachhouse>
References: <20101112220340.36a0bc75@dick.coachhouse>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: adrian.klaver@gmail.com, postgresql2@numerixtechnology.de
Subject: Re: psql -f COPY from STDIN
In-Reply-To: <4CDDCB27.9000004@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox