Re: No error when FROM is missing in subquery - Mailing list pgsql-bugs

From Thomas H.
Subject Re: No error when FROM is missing in subquery
Date
Msg-id 079101c7231d$74ebc260$6601a8c0@iwing
Whole thread Raw
In response to No error when FROM is missing in subquery  ("Nikolay Samokhvalov" <samokhvalov@gmail.com>)
Responses Re: No error when FROM is missing in subquery
Re: No error when FROM is missing in subquery
List 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 by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: No error when FROM is missing in subquery
Next
From: "Jaime Casanova"
Date:
Subject: Re: No error when FROM is missing in subquery