using INTERSECT and UNION in IN clause

From: Alex Guryanow <gav(at)nlr(dot)ru>
To: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgres(dot)org
Subject: using INTERSECT and UNION in IN clause
Date: 2000-08-22 09:50:26
Message-ID: 7576.000822@nlr.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jules Bean 2000-08-22 12:03:25 Re: using INTERSECT and UNION in IN clause
Previous Message Tim Quinlan 2000-08-22 01:13:51 Re: FW: Hi , Semaphore problem --Pl. F1