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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Wed, 24 Feb 2010 13:40:23 +0100
  • Message-id: <20100224124023.GA16500@apartia.fr> <text/plain>

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,



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group