Re: No error when FROM is missing in subquery

From: "Thomas H(dot)" <me(at)alternize(dot)com>
To: "Jaime Casanova" <systemguards(at)gmail(dot)com>, <nikolay(at)samokhvalov(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: No error when FROM is missing in subquery
Date: 2006-12-19 03:26:21
Message-ID: 079101c7231d$74ebc260$6601a8c0@iwing
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jaime Casanova 2006-12-19 03:43:31 Re: No error when FROM is missing in subquery
Previous Message Jaime Casanova 2006-12-19 01:19:08 Re: No error when FROM is missing in subquery