Re: [GENERAL] Multiple-index optimization not working for = ANY operator

2006-02-15 Thread Andrew - Supernews
On 2006-02-15, "Jimmy Choi" <[EMAIL PROTECTED]> wrote: > I find that it doesn't work (i.e. index is not used and a sequential > scan is needed), if I have the following instead: > > SELECT * FROM foo WHERE id = ANY (ARRAY[1,2]); > > Is this expected? The reason I would like the last case to work

Re: [GENERAL] Multiple-index optimization not working for = ANY operator

2006-02-15 Thread Tom Lane
"Jimmy Choi" <[EMAIL PROTECTED]> writes: > I find that it doesn't work (i.e. index is not used and a sequential > scan is needed), if I have the following instead: > SELECT * FROM foo WHERE id = ANY (ARRAY[1,2]); > Is this expected? Yes. That construct isn't indexable, period, in any existing re