Re: [GENERAL] Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Karsten Hilbert
On Tue, Jan 17, 2017 at 09:25:38AM +0100, Thomas Kellerer wrote: > I recently stumbled over the need to use a wildcard escape character for a > condition that makes use of LIKE ANY, something like: > >select * >from some_table >where name like any (array['foo_bar%', 'bar_foo%'])

Re: [GENERAL] Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Tom Lane
Thomas Kellerer writes: > So my question is: Is there any way to specify an alternate wildcard escape > when using LIKE ANY (..)? No, not with ESCAPE. [ manfully resists temptation to run down SQL committee's ability to design composable syntax ... oops ] You could do

[GENERAL] Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Thomas Kellerer
I recently stumbled over the need to use a wildcard escape character for a condition that makes use of LIKE ANY, something like: 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 (I can't