pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Denis de Bernardy <ddebernardy@yahoo.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8226: Inconsistent unnesting of arrays
Date: Wed, 12 Jun 2013 13:03:50 +0200
Message-ID: <20130612110350.GB20851@depesz.com> (raw)
In-Reply-To: <336D0D5D-A04D-4E71-B78F-484017B74F81@yahoo.com>
References: <E1UmgtE-0002si-0x@wrigleys.postgresql.org>
	<CAM-w4HNZ-6X9eAwtCY72Gff3ihOpUF-L2x2+3Wt7=+A7aaJ5+A@mail.gmail.com>
	<336D0D5D-A04D-4E71-B78F-484017B74F81@yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (7+ messages)

Message-ID: <20130612110350.GB20851@depesz.com>
Permalink:  ../20130612110350.GB20851@depesz.com/
Also on:    postgresql.org/message-id/20130612110350.GB20851@depesz.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: depesz@depesz.com, ddebernardy@yahoo.com
  Subject: Re: BUG #8226: Inconsistent unnesting of arrays
  In-Reply-To: <20130612110350.GB20851@depesz.com>
  References: <E1UmgtE-0002si-0x@wrigleys.postgresql.org> <CAM-w4HNZ-6X9eAwtCY72Gff3ihOpUF-L2x2+3Wt7=+A7aaJ5+A@mail.gmail.com> <336D0D5D-A04D-4E71-B78F-484017B74F81@yahoo.com> <20130612110350.GB20851@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox