Re: BUG #5535: Backslash in condition for LIKE statement is not seen

From: Jeff Benjamin <jeff(at)ivertex(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5535: Backslash in condition for LIKE statement is not seen
Date: 2010-07-01 20:39:13
Message-ID: 6090B22B-3310-4DA0-B3AD-B8B92CB74D74@ivertex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks, that works!

On Jul 1, 2010, at 1:34 PM, Kevin Grittner wrote:

> "Jeff Benjamin" <jeff(at)ivertex(dot)com> wrote:
>
>> Seems one cannot use a backslash character in a LIKE condition.
>
> By default that has special meaning as an escape character.
>
> Try this:
>
> select * from test where pattern like E'\\w%' escape '#';
>
> or this:
>
> select * from test where pattern like E'\\\\w%';
>
> -Kevin

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Arnold 2010-07-02 00:18:09 Re: BUG #5533: PQexecParams in Binary Mode returns incorrect value for float4
Previous Message Kevin Grittner 2010-07-01 20:34:56 Re: BUG #5535: Backslash in condition for LIKE statement is not seen