FW: copy command - Mailing list pgsql-admin

From
Subject FW: copy command
Date
Msg-id E502FDA6FE0C5A4BB4EFA4250A1E049001DBE04F@sxmbx51.corproot.net
Whole thread Raw
Responses Re: FW: copy command  (Stef <svb@ucs.co.za>)
List pgsql-admin


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 ".

somehow does not want to work.


RE: [SQL] psql in the command line
from: Russell Simpkins [russellsimpkins@hotmail.com]
if in fact this works: echo "copy test from '/data/log/bla';" | psql logdb
then you probably want to write it like this:
su - postgres -c "echo \"copy test from '/data/log/bla';\"|>psql logdb"
so that you escape the double quotes.

pgsql-admin by date:

Previous
From: "John Jensen"
Date:
Subject: Re: Where is my bottleneck?
Next
From: Stef
Date:
Subject: Re: FW: copy command