[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 near "/" at character 16
> LINE 1: copy test from /data/log/bla;

This is clearly not the same line.  The quotes are not in the same
position as in the line above.

su - postgres -c "psql logdb -c 'copy test from \'data/log/bla\''"

-- 
Alvaro Herrera                        http://www.advogato.org/person/alvherre
"Es filósofo el que disfruta con los enigmas" (G. Coli)

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to