Re: [SQL] psql in the command line

2006-01-25 Thread Owen Jacobson
Alvaro Herrera wrote: > [EMAIL PROTECTED] wrote: > > > test:/opt/pgsql# echo "copy test from '/data/log/bla';" | psql logdb > > COPY > > > > But when I try to execute it as root user I get the following error: > > > > [est/data/log] su - postgres -c "echo 'copy test from > /data/log/bla;'| > >

Re: [SQL] psql in the command line

2006-01-25 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > test:/opt/pgsql# echo "copy test from '/data/log/bla';" | psql logdb > COPY > > But when I try to execute it as root user I get the following error: > > [est/data/log] su - postgres -c "echo 'copy test from /data/log/bla;'| > psql logdb" > ERROR: syntax error at or ne

[SQL] psql in the command line

2006-01-25 Thread Aniko.Badzong
Title: psql in the command line Hi I need some help regarding psql syntax. I would like to copy text files into the database from the command line in a script. I have found already how can I do it as user postrgres: test:/opt/pgsql# echo "copy test from '/data/log/bla';" | psql logdb C