Re: Subselect strange behaviour - bug?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Subselect strange behaviour - bug?
Дата
Msg-id 430.1205692088@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Subselect strange behaviour - bug?  (Mario Splivalo <mario.splivalo@megafon.hr>)
Ответы Re: Subselect strange behaviour - bug?
Список pgsql-sql
Mario Splivalo <mario.splivalo@megafon.hr> writes:
> And here is the 'problematic' query:
> melem=# select * from t2 where id1 in (select id1 from t1);

> I guess postgres should tell me that column name id1 is nonexistant in
> table t1.

No, it shouldn't, because that's a perfectly legal outer reference;
that is, what you wrote is equivalent toselect * from t2 where id1 in (select t2.id1 from t1);
        regards, tom lane


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

Предыдущее
От: Mario Splivalo
Дата:
Сообщение: Subselect strange behaviour - bug?
Следующее
От: Mario Splivalo
Дата:
Сообщение: Re: Subselect strange behaviour - bug?