using INTERSECT and UNION in IN clause - Mailing list pgsql-general

From Alex Guryanow
Subject using INTERSECT and UNION in IN clause
Date
Msg-id 7576.000822@nlr.ru
Whole thread Raw
Responses Re: using INTERSECT and UNION in IN clause
List pgsql-general
Hi,

postgresql 7.0.2. Why by executing the following query

select * from magazine
where id in (
      select mag_id from dict where word = 'akademie' intersect
      select mag_id from dict where word = 'der' intersect
      select mag_id from dict where word = 'klasse' )

I receive the following error:

ERROR: parse error at or near 'intersect'

while the query

      select mag_id from dict where word = 'akademie' intersect
      select mag_id from dict where word = 'der' intersect
      select mag_id from dict where word = 'klasse' )

is executed successfully.

Is it possible to use INTERSECT and UNION keywords in subqueries?


Regards,
Alex



pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Foreign Key Storage
Next
From: Jules Bean
Date:
Subject: Re: using INTERSECT and UNION in IN clause