Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.

>  FROM core.tag_links ctl
>  WHERE (ctl.tag_id = ANY ( array (
>      SELECT
>        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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group