Re: JOINing subselects in FROM?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: PgSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: JOINing subselects in FROM?
Date: 2002-04-28 20:03:43
Message-ID: 11745.1020024223@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)atentus(dot)com> writes:
> [ in development sources ]
> SELECT foo1.mes, valor1999 AS "1999", valor2000 AS "2000" FROM
> (SELECT valor AS valor1999, mes FROM datos WHERE ao=1999) AS foo1
> INNER JOIN
> (SELECT valor AS valor2000, mes FROM datos WHERE ao=2000) AS foo2
> ON foo1.mes=foo2.mes;
> ERROR: flatten_join_alias_var: unexpected subtree type

I have committed changes to fix this bug. Thanks for the report!

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel POURE 2002-04-28 20:08:55 Re: Performance Issues
Previous Message Ron Snyder 2002-04-28 17:17:44 Re: How to track down inconsistent performance?