Skip site navigation (1) Skip section navigation (2)

Re:

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Aniko(dot)Badzong(at)swisscom(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re:
Date: 2006-01-26 12:30:11
Message-ID: 20060126123010.GA10537@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-admin
Aniko(dot)Badzong(at)swisscom(dot)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)

In response to

  • at 2006-01-26 08:52:33 from Aniko.Badzong

pgsql-admin by date

Next:From: Brian A. SekleckiDate: 2006-01-26 12:41:30
Subject: Re: Database Clustering
Previous:From: StefDate: 2006-01-26 11:02:18
Subject: Re: FW: copy command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group