Re: [HACKERS] Fail to search in array, produced by subquery - is it a bug?

2011-04-27 Thread Dmitry Fefelov
> > well, if you *had* to use any you could rewrite that as: Using ANY I'll reduce number of subqueries, there are also some array overlappings, which works fine with same subquery - i.e. when " && " instead of " = ANY ". There is not full qi\uery in my first message of course. > SELECT * > FRO

Re: [HACKERS] Fail to search in array, produced by subquery - is it a bug?

2011-04-27 Thread Merlin Moncure
On Tue, Apr 26, 2011 at 10:29 PM, Dmitry Fefelov wrote: > With Postgres 8.4 query like > > SELECT * >  FROM core.tag_links ctl >  WHERE (ctl.tag_id = ANY ( >      SELECT array_agg(ct.id) >        FROM core.tags ct >        WHERE (LOWER(ct.tag) LIKE LOWER(('search tag')::text || '%') ESCAPE >      

[HACKERS] Fail to search in array, produced by subquery - is it a bug?

2011-04-26 Thread Dmitry Fefelov
With Postgres 8.4 query like SELECT * FROM core.tag_links ctl WHERE (ctl.tag_id = ANY ( SELECT array_agg(ct.id) FROM core.tags ct WHERE (LOWER(ct.tag) LIKE LOWER(('search tag')::text || '%') ESCAPE E'\\') )); produces error: ERROR: operator does not e