"Thomas H." <me@alternize.com> writes:
> SELECT * FROM movies.names WHERE mov_id IN (SELECT DISTINCT mov_id WHERE
> mov_name like '%, %' LIMIT 2)
> the subselect is missing a FROM <table>. in that case, pgsql seemed to also
> ignore the LIMIT 2
It didn't "ignore" anything. Each execution of the sub-select returned
1 row, containing the current mov_id from the outer query. So basically
this would've selected everything passing the LIKE condition.
regards, tom lane