UNION/INTERSECT in subselects

From: Florent Guillaume <florent(dot)guillaume(at)mail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: UNION/INTERSECT in subselects
Date: 2000-09-01 19:19:01
Message-ID: 20000901211901.A23119@twin.efge.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(sorry if you receive this twice)

Hi, I'm using 7.0.2 and I have a problem with UNION in some subselects,
namely the following works:
select * from a where a.f in (select 1)
but this doesn't:
select * from a where a.f in (select 1 union select 2)

In the grammar we have :
in_expr: SubSelect | ...
but SubSelect doesn't allow UNIONs, only select_clause does.

Could in_expr be changed to use select_clause instead without adverse
ill effects ?

In fact SubSelect is used all over the place, so maybe it's better to
switch select_clause and SubSelect in the definitions for SelectStmt,
select_clause and SubSelect ?

Thanks,
Florent

(Please Cc: me in your answers)

Browse pgsql-hackers by date

  From Date Subject
Next Message John McKown 2000-09-01 19:41:53 Re: Postgres startup problem
Previous Message Nataraj 2000-09-01 19:05:25 Postgres startup problem