join with an array

From: Louis-David Mitterrand <vindex+lists-pgsql-sql(at)apartia(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: join with an array
Date: 2010-02-24 12:40:23
Message-ID: 20100224124023.GA16500@apartia.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I'm trying the following query:

select array_agg(t1.id) from table1 t1 join table2 t2 on (t2.id = any(array_agg)) group by t1.col1;

but I get this error: ERROR: column "array_agg" does not exist

I tried aliasing array_agg(t1.id) without success.

Thanks for any suggestions,

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2010-02-24 13:09:09 Re: join with an array
Previous Message Gary Chambers 2010-02-22 22:43:22 Re: Join Advice and Assistance