Search Postgresql Archives

Re: bug in 8.4 and resolved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Abhinav Dwivedi wrote on 22.04.2013 07:12:
select * from district where statecode in (Select districtcode from state)

Please note that the attribute districtcode is not existent in the table state and
if this query i.e. Select districtcode from state is executed in isolation then it
correctly throws an error message. But when this incorrect query is made inner query
of a nested query then the whole query wrongly returns a dataset.

I assume the column districtcode is present in the table district. In that case this is not a bug,
this is required by the SQL standard. The sub-query references the column from the outer query.

And I don't think this has been changed with 9.x (nor will it ever).





--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux