Re: Fail to search in array, produced by subquery - is it a bug? - Mailing list pgsql-hackers

From Dmitry Fefelov
Subject Re: Fail to search in array, produced by subquery - is it a bug?
Date
Msg-id 201104281205.26310.fozzy@ac-sw.com
Whole thread Raw
In response to Re: Fail to search in array, produced by subquery - is it a bug?  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
> 
> 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 *
>  FROM core.tag_links ctl
>  WHERE (ctl.tag_id = ANY ( array (
>      SELECT ct.id
>        FROM core.tags ct
>        WHERE (LOWER(ct.tag) LIKE LOWER(('search tag')::text || '%') ESCAPE
>            E'\\'))
>    ));
> 

Okay, thank you for a hint. 
I asked because I thought that ANY and ALL should work too - when overlap 
("&&") works.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: unknown conversion %m
Next
From: Palle Girgensohn
Date:
Subject: Re: [ANNOUNCE] PostgreSQL Core Team