Re: 7.4 quoting - Mailing list pgsql-general

From Arjen Nienhuis
Subject Re: 7.4 quoting
Date
Msg-id AANLkTikK7e-U8oXKLEmCTC0H9V9W4i3neR+5Nb6y25XR@mail.gmail.com
Whole thread Raw
In response to Re: 7.4 quoting  (Arjen Nienhuis <a.g.nienhuis@gmail.com>)
Responses Re: 7.4 quoting  (Steve Clark <sclark@netwolves.com>)
List pgsql-general
On Thu, Mar 31, 2011 at 20:05, Arjen Nienhuis <a.g.nienhuis@gmail.com> wrote:
> On Thu, Mar 31, 2011 at 18:56, Steve Clark <sclark@netwolves.com> wrote:
>> Hi List,
>>
>> I am having a problem trying to do the following:
>> ssh postgres@192.168.198.93 '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@192.168.198.93 '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@192.168.198.93 '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@192.168.198.93 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@192.168.198.93 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

pgsql-general by date:

Previous
From: Arjen Nienhuis
Date:
Subject: Re: 7.4 quoting
Next
From: Steve Crawford
Date:
Subject: Re: [HACKERS] Date conversion using day of week