PG Bug reporting form <noreply@postgresql.org> writes:
> A subquery that has an incorrect column name, that happens to match a column
> name in the outer query evaluates as true for all rows in the outer query.
Such a reference is called an "outer reference", and it's a required
feature in the SQL standard. The reason you get "true" is that the
expression
> where a in ( select a from btable where c = 10) ;
is basically reducing to "a = a".
https://wiki.postgresql.org/wiki/FAQ#Why_doesn.27t_PostgreSQL_report_a_column_not_found_error_when_using_the_wrong_name_in_a_subquery.3F
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера