On Sat, 13 Nov 2010 12:01:35 +
Tarlika Elisabeth Schmitz wrote:
>I'd like the store the COPY command in a separate file without
>specifying an input file name. I want to feed it the data from the
>shell script that calls psql
"STDIN: All rows are read from the same source that issued the co
Tarlika Elisabeth Schmitz writes:
> I changed event.sql (3 lines):
> \COPY
> (event_id, event_name)
> FROM STDIN DELIMITER AS ',' NULL AS ''
> Now I am getting error messages:
> psql:event.sql:1: \copy:parse error at end of line
I don't believe you can split backslash commands across lin
On Fri, 12 Nov 2010 22:22:11 -0500
Tom Lane wrote:
>Tarlika Elisabeth Schmitz writes:
>> 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
Tarlika Elisabeth Schmitz writes:
> 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):
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 message
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 STD