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

From: Dmitry Fefelov <fozzy(at)ac-sw(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fail to search in array, produced by subquery - is it a bug?
Date: 2011-04-28 05:05:26
Message-ID: 201104281205.26310.fozzy@ac-sw.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-04-28 05:21:55 Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Previous Message Tom Lane 2011-04-28 04:44:44 Re: unknown conversion %m