Re: how to escape _ in select - Mailing list pgsql-sql

From Wes James
Subject Re: how to escape _ in select
Date
Msg-id AANLkTikS=b1K09JEUdxUyxDisCDRTryPp9BgbMm3pTq2@mail.gmail.com
Whole thread Raw
In response to how to escape _ in select  (Wes James <comptekki@gmail.com>)
Responses Re: how to escape _ in select  (Dmitriy Igrishin <dmitigr@gmail.com>)
List pgsql-sql
On Wed, Jul 28, 2010 at 12:15 PM, Little, Douglas
<DOUGLAS.LITTLE@orbitz.com> wrote:
> Wes.
>
> You probably missed the part in bold.   You need to double the backslash.
>
> select 'ab5c' like '%\_c'
>
> t
>

Why doesn't this work?

select * from table where field::text ilike '%\\\%'

WARNING:  nonstandard use of \\ in a string literal

-wes


pgsql-sql by date:

Previous
From: Wes James
Date:
Subject: Re: how to escape _ in select
Next
From: Dmitriy Igrishin
Date:
Subject: Re: how to escape _ in select