On 16.09.2011 12:59, Marc Mamin wrote:
> This is not valid, but is accepted.
>
>
> EXPLAIN analyze
> select * from test_f_files_steps where id in
> (select id from
> (
> select file_id,class_id from test_f_files_steps
> EXCEPT
> select id,class_id from test_f_files_status
> )foo
> )
It is valid, it just doesn't do what you might expect. The "id" in
"select id from (..." refers to the id field in the outer query.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com