Home > Archive > PostgreSQL Administration > January 2006 > Re:









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re:
Alvaro Herrera

2006-01-26, 4:59 pm

Aniko.Badzong@swisscom.com wrote:
> Hi
>
> I have tried it yesterday to escaoe the double qutoes and I get the
> error:
>
> [test] su - postgres -c "echo \"copy test from '/data/log/bla';"\" |
> psql logdb"
> Unmatched ".


You still don't fix it? I remembered yesterday that the shell doesn't
want escaped quotes inside a quoted argument, so you must quit the
quoted environment and put an escaped quote, something like

su - postgres -c "echo "\""copy test from '/data/log/bla';"\"" | pgsql logdb"

The echo-pipe is still overkill, you can do it using -c as I showed
yesterday by applying the same "trick".

--
Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 17.7", W 73º 14' 26.8"
"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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com