On Jul 26, 2018, at 9:44 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Nicolas Even <neven(at)ztel(dot)org> writes:
>> However when I run the same (as far as I understand it) query but with
>> the ALL operator, the index is not used:
>> explain analyze select name from totoz where name ilike all(array['%tot%']);
>
> There's only index support for "op ANY (array)", not "op ALL (array)".
>
> regards, tom lane
Nicolas,
Could you work around the limitation with a two-clause WHERE?
First clause ANY, second clause ALL.
I've done some similar tricks on similar sorts of queries.
Matthew.