| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
|---|---|
| To: | Aniko(dot)Badzong(at)swisscom(dot)com |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: psql in the command line |
| Date: | 2006-01-25 16:05:37 |
| Message-ID: | 20060125160537.GC2077@surnet.cl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Aniko(dot)Badzong(at)swisscom(dot)com 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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jaime Casanova | 2006-01-25 16:46:12 | Re: Changing the transaction isolation level within the stored procedure? |
| Previous Message | Aniko.Badzong | 2006-01-25 15:57:22 | psql in the command line |