Re: Bug #480: problem with LIKE pattern matches involving - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: Bug #480: problem with LIKE pattern matches involving
Date
Msg-id Pine.BSF.4.21.0110121118330.97475-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Bug #480: problem with LIKE pattern matches involving % and \_  (pgsql-bugs@postgresql.org)
List pgsql-bugs
On Fri, 12 Oct 2001 pgsql-bugs@postgresql.org wrote:

> Tom Cross (decius@whack.org) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> problem with LIKE pattern matches involving % and \_
>
> Long Description
> The following pattern matches do not work:
>
> LIKE '%\_%'
> LIKE '%\_'
> LIKE '\_%'

I think you need to double the backslashes, so
'%\\_%' searches for anything with an underscore.

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: [GENERAL] Cant get planner to use index (7.1.3-1PGDG)
Next
From: Tom Lane
Date:
Subject: Re: Bug #480: problem with LIKE pattern matches involving % and \_