Martin Neimeier wrote:
> Hello,
> some additional informations:
>
> - if i execute the subselect alone, it works fine !.
> - The same select statement works with sybase and oracle, so i think its a legal
>statement.
> - After reading in the sql2-standard, i have found nothing which restricts unions in
>sub-selects.
>
Create a temp table (I did it this way):
instead of
select x from table where x in (select A union select B);
create temp table t1 (x type_of_x; );
insert into t1 select A union select B;
select x from table where exists (select t1.x from t1 where t1.x=table.x);
Using exists instead of in circumvents another restriction of PostgreSQL.
Tom Lane said, these bugs would be addressed during the query tree reorganization
(7.2, in 2001)
>
> (I don't want to use another rdbms ... i want to use PostgreSQL :-)))))
>
> If somebody has a workaround, then i am the happiest person for the day.
Could be ... if you can live with this ...
Christof