X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 06AAB9DC9D1 for ; Thu, 26 Jan 2006 08:27:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79522-04 for ; Thu, 26 Jan 2006 08:27:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from alvh.no-ip.org (201-220-123-7.bk10-dsl.surnet.cl [201.220.123.7]) by postgresql.org (Postfix) with ESMTP id AE9DF9DC880 for ; Thu, 26 Jan 2006 08:27:15 -0400 (AST) Received: by alvh.no-ip.org (Postfix, from userid 1000) id 31737C2DC59; Thu, 26 Jan 2006 09:30:11 -0300 (CLST) Date: Thu, 26 Jan 2006 09:30:11 -0300 From: Alvaro Herrera To: Aniko.Badzong@swisscom.com Cc: pgsql-admin@postgresql.org Subject: Re: Message-ID: <20060126123010.GA10537@surnet.cl> Mail-Followup-To: Aniko.Badzong@swisscom.com, pgsql-admin@postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.781 required=5 tests=[AWL=-0.138, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 1.781 X-Spam-Level: * X-Archive-Number: 200601/297 X-Sequence-Number: 20385 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)