Re: No error when FROM is missing in subquery

Поиск
Список
Период
Сортировка
От Thomas H.
Тема Re: No error when FROM is missing in subquery
Дата
Msg-id 079101c7231d$74ebc260$6601a8c0@iwing
обсуждение исходный текст
Ответ на No error when FROM is missing in subquery  ("Nikolay Samokhvalov" <samokhvalov@gmail.com>)
Ответы Re: No error when FROM is missing in subquery  ("Jaime Casanova" <systemguards@gmail.com>)
Re: No error when FROM is missing in subquery  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
>> > Is it a bug? If no, maybe to produce warning in such cases?

oups. just thumbled over this as well when i forgot a FROM in a WHERE ... IN
(....) and damaged quite some data. the bad query went like this:

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 and returned 3706 records out of ~130000... no clue which
ones :-/

- thomas

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

Предыдущее
От: "Jaime Casanova"
Дата:
Сообщение: Re: No error when FROM is missing in subquery
Следующее
От: "Jaime Casanova"
Дата:
Сообщение: Re: No error when FROM is missing in subquery