Re: Bug #480: problem with LIKE pattern matches involving

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: decius(at)whack(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #480: problem with LIKE pattern matches involving
Date: 2001-10-12 18:22:47
Message-ID: Pine.BSF.4.21.0110121118330.97475-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 12 Oct 2001 pgsql-bugs(at)postgresql(dot)org wrote:

> Tom Cross (decius(at)whack(dot)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.

In response to

Browse pgsql-bugs by date

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