Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UmiqK-0007Qe-TH for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Jun 2013 11:03:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UmiqK-0000OV-9r for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Jun 2013 11:03:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UmiqJ-0000Ny-H0 for pgsql-bugs@postgresql.org; Wed, 12 Jun 2013 11:03:55 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UmiqF-0002by-Od for pgsql-bugs@postgresql.org; Wed, 12 Jun 2013 11:03:55 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.80) (envelope-from ) id 1UmiqE-0006nD-BZ; Wed, 12 Jun 2013 13:03:50 +0200 Date: Wed, 12 Jun 2013 13:03:50 +0200 From: hubert depesz lubaczewski To: Denis de Bernardy Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8226: Inconsistent unnesting of arrays Message-ID: <20130612110350.GB20851@depesz.com> Reply-To: depesz@depesz.com References: <336D0D5D-A04D-4E71-B78F-484017B74F81@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <336D0D5D-A04D-4E71-B78F-484017B74F81@yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Wed, Jun 12, 2013 at 12:19:51PM +0200, Denis de Bernardy wrote: > … where groups is a crazy column containing an array that needed to be > joined with another table. In this case, you cannot do your suggested > solution, which would look like this: Missed this one. You don't need to unpack to join. you can do: select * from tablea join tableb on tableb.id = any (tablea.array_column); depesz -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs