Re: No error when FROM is missing in subquery

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: No error when FROM is missing in subquery
Дата
Msg-id 13478.1166505583@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: No error when FROM is missing in subquery  ("Thomas H." <me@alternize.com>)
Список pgsql-bugs
"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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2837: i received ERROR: failed to build any 7-way joins
Следующее
От: mike
Дата:
Сообщение: Re: No error when FROM is missing in subquery