Search Postgresql Archives

Re: 7.4 quoting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/31/2011 02:06 PM, Arjen Nienhuis wrote:
On Thu, Mar 31, 2011 at 20:05, Arjen Nienhuis <a.g.nienhuis@xxxxxxxxx> wrote:
On Thu, Mar 31, 2011 at 18:56, Steve Clark <sclark@xxxxxxxxxxxxx> wrote:
Hi List,

I am having a problem trying to do the following:
ssh postgres@xxxxxxxxxxxxxx 'psql -Atc "select a.interface,
a.source_ip,a.dest_ip from kernel_gre a, ospfd_interface b where a.interface
= b.interface and config ilike '%cost 50%';" config.db'

bash turns it into this:
ssh postgres@xxxxxxxxxxxxxx 'psql -Atc "select a.interface,
a.source_ip,a.dest_ip from kernel_gre a, ospfd_interface b where a.interface
= b.interface and config ilike %cost' '50%;" config.db'
try:

ssh postgres@xxxxxxxxxxxxxx 'psql -Atc "select a.interface,
a.source_ip,a.dest_ip from kernel_gre a, ospfd_interface b where
a.interface = b.interface and config ilike '%cost 50%';" config.db'

which bash turns into:

ssh postgres@xxxxxxxxxxxxxx psql -Atc "select a.interface,
a.source_ip,a.dest_ip from kernel_gre a, ospfd_interface b where
a.interface = b.interface and config ilike '%cost 50%'" config.db

Argh!

I mean:

ssh postgres@xxxxxxxxxxxxxx psql -Atc \"select a.interface,
a.source_ip,a.dest_ip from kernel_gre a, ospfd_interface b where
a.interface = b.interface and config ilike \'%cost 50%\'\" config.db

Great! that did it thanks a bunch!!!

Regards,
Steve

--
Stephen Clark
NetWolves
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.clark@xxxxxxxxxxxxx
http://www.netwolves.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux