[GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search usingLIKE ANY (...) - Mailing list pgsql-general

From Thomas Kellerer
Subject [GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search usingLIKE ANY (...)
Date
Msg-id o5l9l8$io4$1@blaine.gmane.org
Whole thread Raw
In response to [GENERAL] Is it possible to specify an ESCAPE for a wildcard search using LIKEANY (...)  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: [GENERAL] Re: Is it possible to specify an ESCAPE for a wildcardsearch using LIKE ANY (...)  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
Karsten Hilbert schrieb am 17.01.2017 um 14:42:
>> I recently stumbled over the need to use a wildcard escape character for a condition that makes use of LIKE ANY,
somethinglike: 
>>
>>    select *
>>    from some_table
>>    where name like any (array['foo_bar%', 'bar_foo%']) escape '/';
>>
>> so that the underscore wouldn't be treated as a wildard
>
> May I ask for clarification:
>
> Do you need to have the _ NOT be recognized as a wildcard ?

Yes, the underscore should NOT be a wildcard in this case.

Now that I think about it - my question actually doesn't make sense.

In order to be able to _use_ an escape character I would need to supply one.
And if I can supply one, I can use the standard one as well.

Sorry for the noise

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: [GENERAL] Is it possible to specify an ESCAPE for a wildcardsearch using LIKE ANY (...)
Next
From: Karsten Hilbert
Date:
Subject: Re: [GENERAL] Re: Is it possible to specify an ESCAPE for a wildcardsearch using LIKE ANY (...)