pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Aniko.Badzong@swisscom.com
Cc: pgsql-admin@postgresql.org
Subject: Re:
Date: Thu, 26 Jan 2006 09:30:11 -0300
Message-ID: <20060126123010.GA10537@surnet.cl> (raw)
In-Reply-To: <E502FDA6FE0C5A4BB4EFA4250A1E049001DBE04B@sxmbx51.corproot.net>
References: <E502FDA6FE0C5A4BB4EFA4250A1E049001DBE04B@sxmbx51.corproot.net>

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)



view thread (3+ messages)  latest in thread

Message-ID: <20060126123010.GA10537@surnet.cl>
Permalink:  ../20060126123010.GA10537@surnet.cl/
Also on:    postgresql.org/message-id/20060126123010.GA10537@surnet.cl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: alvherre@alvh.no-ip.org, Aniko.Badzong@swisscom.com
  Subject: Re: 
  In-Reply-To: <20060126123010.GA10537@surnet.cl>
  References: <E502FDA6FE0C5A4BB4EFA4250A1E049001DBE04B@sxmbx51.corproot.net> <20060126123010.GA10537@surnet.cl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox